-
-
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
[DropDownMenu] buggy value prop check #1761
Comments
I think you're right @yulric. The |
Actually, sorry it's just a bug in the code. If you look at https://github.com/callemall/material-ui/blob/master/src/drop-down-menu.jsx#L185, we don't check if it is defined meaning that if we pass a value prop with a value of 0 (which is what I was doing) then it then doesn't go through the code which sets the value of selectedIndex, which is why I assumed that the value prop wasn't working. Sorry about that. |
Ah I missed that too. If |
yeah I think it should be if(value !== null && value !== undefined) |
PR welcome! :-) |
Cool, I'll get one in by tonight I think. |
Fixed in PR #1768 |
* Improve input customization exprience and add new examples * Remove data-mui-test from renderInput props * Add missing prop-types for new props * Remove inputProps import to properly treeskahe in production * Improve docs of `renderInput` * Remove 1-level import from '@material-ui/core'
Hi there,
When I use a SelectField component it looks like the value prop is ignored and the selectedIndex prop is used to set the DropdownMenu text. If this is the default functionality then the docs need to be updated.
Thanks,
Yulric
The text was updated successfully, but these errors were encountered: