Closed adamdawkins closed 8 years ago
Hmm.. You're right. Initially we did that to limit the content to a single item. But with the current state of the menu, it's not compatible :s
A PR is welcome to address this issue. Should be trivial. Probably just need to remove this: https://github.com/tleunen/react-mdl/blob/master/src/List/ListItemAction.js#L5
Thanks @adamdawkins
I just got this warning.
I believe you don't want to remove children
from ProprTypes
. Usually people put PropTypes.node
. See https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md#as-for-exceptions
Usually I set children
as an exception, but I agree we should set it as node
instead.
Thanks!
Hey.
I've added a Menu to the
ListItemAction
, which feels like a valid use, but I'm getting the warning thatwarning.js:44 Warning: Failed propType: Invalid prop
childrensupplied to
ListItemAction, expected a single ReactElement. Check the render method of
EmployeeListItem`.I'm passing in an
IconButton
and aMenu
, like so:Is there a reason this shouldn't be allowed?