-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] onBlur event target #12204
Comments
@Mangatt We are trying to simulate a native select. The implementation is challenging. The blur event comes from a div: https://github.com/mui-org/material-ui/blob/4bf97b52113f104174f0cd850bfc2a8fc73c2d99/packages/material-ui/src/Select/SelectInput.js#L287 |
Just a suggestion, wouldn't be better to pass name/value in event.target, same way that it is handled in onChange event in https://github.com/mui-org/material-ui/blob/a207808404a703d1ea2b03ac510343be6404b166/packages/material-ui/src/Select/SelectInput.js#L102? |
@Mangatt Yeah, maybe. |
@oliviertassinari I can work on this one? Just to confirm the agreed upon solution is to pass |
@hassan-zaheer It would be great, since I'm unavailable to work on this issue right now. And I guess that no one else is working on this. |
np I can submit a fix tonight |
* As discussed in #12204 - added "name" to - event.target for onBlur callback * clone the onChange event logic
There is some mismatch with [Select] events.
In this case, both events are fired, but onChange has
event.target
set to [Input] with appropriate attributes, but onBlur hasevent.target
set to [Select]. Even when onBlur is set directly to [Input],event.target
is still [Select].Problem is that this makes onBlur event useless when you need handle input value onBlur in stateless components. You can't read input value or any of attributes.
The text was updated successfully, but these errors were encountered: