When I use SelectField componect the callback "onChange" only pass through the event object.
It makes sense to know the which item is selected.
Here is a piece of source code in select-field.jsx
onChange(e, index, payload) {
if (payload) {
e.target.value = payload[this.props.valueMember] || payload;
}
if (this.props.onChange) {
this.props.onChange(e);
}
}
I think it should be a missing to forget to pass "index" to onChange
You can use event.target.value
. See https://facebook.github.io/react/docs/forms.html.
Fixed with #1194
How to pass more parameters in onchange? Whats the syntax?
Most helpful comment
How to pass more parameters in onchange? Whats the syntax?