-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SelectField] "onChange" event doesn't pass enough parameters #1193
Labels
component: select
This is the name of the generic UI component, not the React module!
Comments
You can use |
hai-cea
pushed a commit
that referenced
this issue
Jul 17, 2015
to pass through enough parameters to onChange. see #1193
Fixed with #1194 |
JAStanton
pushed a commit
to convoyinc/material-ui
that referenced
this issue
Jul 30, 2015
I raised mui#1193 for describing the reason
How to pass more parameters in onchange? Whats the syntax? |
This was referenced Apr 13, 2021
This was referenced Apr 26, 2021
zannager
added
the
component: select
This is the name of the generic UI component, not the React module!
label
Dec 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: