ListItemSecondaryAction in MenuItem makes <li> inside <li> #10452
Labels
component: list
This is the name of the generic UI component, not the React module!
new feature
New feature or request
Milestone
ListItemSecondaryAction in MenuItem cause
Warning: validateDOMNesting(...): <li> cannot appear as a descendant of <li>.
Expected Behavior
inside component should be
div
.Current Behavior
inside component becomes
li
.Steps to Reproduce (for bugs)
https://codesandbox.io/s/2z43ov89vn
Context
ListItem
hascomponent
andContainerComponent
props, butMenuItem
has onlycomponent
props.To fix this warning, remove
component
defaultProps and addContainerComponent
defaultProps asli
in MenuItem and pass it toListItem
(keep same props between these component).Or, pass
MenuItem
'scomponent
props toListItem
asContainerComponent
.related pr #10050
If you want, I will send pr to fix this.
Your Environment
The text was updated successfully, but these errors were encountered: