-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
LeftNav is still using old menu -- which will be deprecated soon #2491
Comments
@sothychan menuItems will be deprecated too, see #2456. I wouldn't bother If I were you 😁 |
And within the PR deprecating that, we'll address all the issues regarding this. Also, there is debate whether the LeftNav should actually ever attack a handler. Making assumptions is bad for production. So maybe try controlling LeftNav via it's open prop and onRequestChange, and add a handler to your menu-items handling the closing. This library tries to cover too many use-cases, where as react's philosophy is composablity. I believe this library should do one thing very good: implement Material Design with good customization. But it makes too many assumptions. These issue must be addressed! |
Excellent. As a workaround, I just added onTouchTap events to my menuItems for now. Glad to hear that it's on the radar. I will take your advice and not bother with it :). I am interested and can make myself available to help if you guys need. If so, please PM me and give me the details on how you guys envisioned how it should be built. |
@subjectix When you say that menuItems will be deprecated, you're talking about the old one, correct? The one here: /material-ui/src/menu/*? The one in /material-ui/src/menus are still valid, correct? Or, are you getting rid of menu items altogether and use list items instead since it seems like it just renders that underneath the hood? |
@sothychan I'm talking about using |
Is this on purpose? Nevertheless, there's a serious bug with left nav where if you were to pass in the menu-item component from the new menu, the code in left-nav completely bypasses the logic to attach the event handler to it so clicking on the menu items do not fire any events.
I am strongly hoping that this is an oversight. Regardless, I've already forked the project and plan to fix the issue. I will submit a PR when it's ready.
The text was updated successfully, but these errors were encountered: