Skip to content

[SelectField] "onChange" event doesn't pass enough parameters #1193

@iamzhouyi

Description

@iamzhouyi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: selectChanges related to the select.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions