Field choices still raises React warning
- Dominant language
- JavaScript
- Stars
- 634
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
This sample gives "Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of FormRow."
This was fixed in #68, but somehow still gives warnings.
``` javascript
var React = require("react");
var forms = require("newforms");
var IPIN = forms.Form.extend({
dev: forms.ChoiceField(),
});
var Thing = React.createClass({
getInitialState: function(){
return {form: new IPIN({controlled:true, onChange: this.forceUpdate.bind(this)})}
},
componentDidMount: function(){
var fform = this.refs["ipin"].getForm();
fform.fields.dev.setChoices(["a", "b", "c"]);
fform.setData({}); //to force re-render
},
render: function(){
return (
submit
);
}
});
var r = React.render(, document.body);
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.