-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[DropDownMenu, SelectField] Unable to put nested Menus inside of a DropDownMenu #4887
Comments
This is problem for my team, but it is also a spec issue. https://material.google.com/components/menus.html#menus-usage under the "Cascading Menus" heading. I have been looking around the source code and can't really get it "working" without getting a bunch of setState on unmounted component for Popover. Would be glad to do the PR if someone could provide some direction. |
can anyone respond to this. this is becoming a big issue for my project. would gladly put in a pr if someone can provide some guidance? have tried several options but they all result in setState on unmounted component warnings. |
anyone know a workaround? |
I used ant design dropdown component. It supports nested menus. Although design is not material design. |
We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it. |
Problem description
I want to have a DropDownMenu where top level items items that actually open up a submenu (passing in the
menuItems
prop to aMenuItem
that is the child ofDropDownMenu
.There are a few issues with this (as far as I can tell).
handleItemTouchTap
method closes the menu (setsopen
tofalse
).handleItemTouchTap
(in DropDownMenu.js) has themenuItems
prop and its length is > 0. If so, don't change the state or call theonChange
callbackhandleItemTouchTap
method so clicking on them wont close the menucloneMenuItem
(in Menu.js)value
s, this causes the DropDownMenu to be really small and have no text in it.hintText
similar to all input fields in Material-UISteps to reproduce
Make a DropDownMenu and provide one of its MenuItems with the menuItems prop
Versions
The text was updated successfully, but these errors were encountered: