Skip to content
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

[Select] onChange doesn't return the selected child element when native = false #12739

Closed
2 tasks done
akaxiaok opened this issue Sep 1, 2018 · 0 comments · May be fixed by nbv1982/material-ui#62, hzhz/material-ui#53, maniator/material-ui#24 or Nealm03/material-ui#9
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!

Comments

@akaxiaok
Copy link
Contributor

akaxiaok commented Sep 1, 2018

  • This is a v1.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

is #12448 about native = true?

Expected Behavior

onChange return the selected child element as second argument when native = false

Current Behavior

onChange only return event

Steps to Reproduce

Edit Material demo

Possible Causes

https://github.com/mui-org/material-ui/blob/20f092609316b2f4a9f1b191a9c681c89f55b55a/packages/material-ui/src/Select/SelectInput.js#L98
SelectInput passed the child, but input does't get it
https://github.com/mui-org/material-ui/blob/20f092609316b2f4a9f1b191a9c681c89f55b55a/packages/material-ui/src/Input/Input.js#L307-L316

akaxiaok added a commit to akaxiaok/material-ui that referenced this issue Sep 2, 2018
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! labels Sep 2, 2018
akaxiaok added a commit to akaxiaok/material-ui that referenced this issue Sep 12, 2018
akaxiaok added a commit to akaxiaok/material-ui that referenced this issue Sep 12, 2018
oliviertassinari pushed a commit that referenced this issue Sep 12, 2018
* [Select] Test if child passed to onChange handler
#12739

* [Select] Test if child passed to onChange handler
#12739
marcelpanse pushed a commit to marcelpanse/material-ui that referenced this issue Oct 2, 2018
* [Select] Test if child passed to onChange handler
mui#12739

* [Select] Test if child passed to onChange handler
mui#12739
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!
Projects
None yet
2 participants