Make the MenuItem value prop more flexible (in README)
erik-beus opened this issue · comments
From the README it seems that the value
property on a MenuItem
component can only be of the type: String/Boolean/Number.
However, when passing an object instead the selectItem
passes the object on just fine and everything still works as expected.
Is there any reason why the README says that the value can only be a String/Boolean/Number?
Yeah, @erik-beus: I can't think of a reason value
could not be any arbitrary type.
My guess is that I was thinking about value types that could also be provided as children of the component? But boolean doesn't really make sense with that ... maybe my imagination was just limited at the time? I don't trust the old me.
I'm open to a PR updating the docs to allow for more flexibility 👍