-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Unknown prop nestedLevel
on <a> tag. Remove this prop from the element.
#5019
Comments
This issue is definitely not limited to the |
Any Quick fix for this ? |
One approach could be to use #4560, but that has proven not to be a great solution (was reverted). <ListItem
primaryText="Get Started"
primaryTogglesNestedList={true}
nestedItems={[
<ListItem
containerElement={<Link to="/get-started/required-knowledge" />}
primaryText="Required Knowledge"
value="/get-started/required-knowledge"
/>,
// ... Noticed that on the <ListItem
className={classes.navLink}
gutters={false}
>
<Button
component={Link}
to={to}
className={classNames(classes.button, classes.navLinkButton)}
activeClassName={classes.activeButton}
ripple={false}
onClick={this.props.onClick}
>
{title}
</Button>
</ListItem> |
containerElement is not working for us but children is working fine. Thanks ! |
containerElement worked for me, thanks. |
Problem description
Using react-router's Link with nested ListItems results in a prop warning 'Unknown prop
nestedLevel
on tag. Remove this prop from the element.'Steps to reproduce
Use this JSX
Versions
This is caused by NestedList assuming that the direct children are all ListItems and not ListItems wrapped with a Link. https://github.com/callemall/material-ui/blob/master/src/List/NestedList.js#L39
The text was updated successfully, but these errors were encountered: