-
-
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
[Dropdown Menu] value propType is React.PropTypes.object #2350
Comments
Sorry, but I plan to move the documentation of each property from the doc to the source code. Can we instead use the |
Sure! Fine by me. I just wanted to be sure that I wasn't using the SelectField component improperly. So that I can be sure, the Should I go ahead with the PR to use oneOf then? |
It seems that you are using it as in the documentation. It should be the right way to do. Having a look at this line https://github.com/callemall/material-ui/blob/master/src/drop-down-menu.jsx#L207. |
edit: never mind, i had an old cached version. everything is good. |
I think this shouldn't have a strict propType. If it must, it should be type number. In Select Fields, the example value property is an int.
In my case, I found this when I tried passing in a whole selected menuItem
{ payload: 1, text: "LAX" }
as value to a SelectFields component. This allowed me to select a component but it wouldn't display. When I passed the selected item's payload as value, it worked properly but I received warningI think the fix would be to just remove the value property from Dropdown Menu's propTypes. I can make a PR if this is correct.
The text was updated successfully, but these errors were encountered: