-
Notifications
You must be signed in to change notification settings - Fork 461
[NavMenu] Enhance working in mobile view #2183
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
Conversation
- Add CustomToggleId to FluentNavBase - Add onclick to FluentNavGroup/FluentNavLink
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 60%
|
|
This is working perfectly for me - thank you for the update. I didn't think of the approach of making the menu take 100% but it makes great sense in operation. In my application, a But they also have a set of I can't seem to make that work. I thought I could use the I think it is perfectly OK to close one menu when another one opens when the screen is less than 600px. In normal mode, having two menus works great. Are there any tips or samples to achieve this? Would it help if I put up a repo? |
|
Think you should start a post I the discussion area. Include some screens and code examples. |
The demo site was already configured for this but it would not work that way in a site created with the template. With these changes clicking on either the button or the group will just expand/collapse that group (when no href set on the group) for template created sites.
The template created sites had an (JS)
onclickevent on thenavelement so that the menu would be closed after navigating to an item. This PR moves that logic to theFluentNavGroup/FluentNavLink(when an href is set)With these change we get consistent behavior in both demo and template sites whare a menu group can be expanded/collapsed by clicking it and clicking an item navigates to that item and closes the menu:
Before:
After:
Changes: