Skip to content
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

MenuItem close when has children #5399

Closed
ffrizzo opened this issue Oct 15, 2016 · 4 comments
Closed

MenuItem close when has children #5399

ffrizzo opened this issue Oct 15, 2016 · 4 comments
Labels
component: menu This is the name of the generic UI component, not the React module! v0.x

Comments

@ffrizzo
Copy link

ffrizzo commented Oct 15, 2016

Problem description

I'm trying to use on AppBar with the IconMenu and MenuItem. This works for the first children in the
tree. But when I'm trying to use children of a children this wont work.

This work

MenuItem
     MenuItem

This wont work

MenuItem
     MenuItem
           MenuItem

I'm trying to figure out what's happen but until now I doesn't have success. If someone can point me to where I can fix this I can work and make a PR

Example of code

http://www.webpackbin.com/4JN_dLi0-

Versions

  • Material-UI: 0.16.0
  • React: 15.3.2
  • Browser: Chrome/Firefox/Safari
@jmansor
Copy link

jmansor commented Oct 17, 2016

Found the same problem. Not sure if this is a bug or it is by design, as Material Design suggests limiting nesting one level deep.

https://material.google.com/components/menus.html#menus-menu-items

Menu nesting

Menu items can reveal nested submenus. Ideally, limit nesting to one level deep, as it can be difficult to navigate multiple nested submenus.

This also happens when using a regular Menu, as soon as you reach the second level in Main Menu > First Level (popover) > Second Level (popover) and click a MenuItem, it makes the First Level disappear and closes the whole thing.

Doesn't seem possible at all to nest more than one level in IconMenu and more that two levels in Menu.

@ffrizzo
Copy link
Author

ffrizzo commented Oct 18, 2016

@jmansor yes I saw that. But it says "Ideally, limit nesting to one level deep". So I believe we can have a second/third level, of course this is not recommended but in some cases this can be necessary

@jeffshaver
Copy link

I believe this and #4887 are related

@mbrookes
Copy link
Member

Dupe of #4887

@oliviertassinari oliviertassinari removed the component: menu This is the name of the generic UI component, not the React module! label Jul 14, 2017
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 21, 2022
@zannager zannager added component: menu This is the name of the generic UI component, not the React module! v0.x and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module! v0.x
Projects
None yet
Development

No branches or pull requests

7 participants