-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
Description
Working with the Select field which states that the value can be any kind does not work properly with objects. The onChange will produce the correct result, but trying to set value = to an object will fail when selecting the value.
Example
<SelectField value={{ foo: 'bar' }}>
<MenuItem value={{ foo: 'bar' }} primaryText={p.key} label={p.key} />
</SelectField>The issue seems to come from here https://github.com/callemall/material-ui/blob/master/src/DropDownMenu/DropDownMenu.js#L297 where just a normal equality check is used.
Possible solution is to check type of and if it is object then stringify the values
Reactions are currently unavailable