Multiple Submenu Menu Items Highlighted
See original GitHub issueDescribe the bug
I have a Menu with a Submenu. When I click on one of the Menu Item’s in the Submenu, it is highlighted as expected. But when I click on another one, both of them are now Highlighted and not just the last of clicked.
Steps to reproduce (please include code)
<Menu Theme="MenuTheme.Dark" Mode="MenuMode.Horizontal" DefaultSelectedKeys=@(new[]{"1"}) Accordion=true>
<MenuItem Key="1" RouterLink="/">Home</MenuItem>
<SubMenu Title="Admin" Key="2">
<MenuItem Title="Resources" RouterLink="/resources" />
<MenuItem Title="Activity Types" RouterLink="/activitytypes" />
</SubMenu>
</Menu>
Exceptions (if any)
When another menu item (inside a submenu) is clicked, it is the only one highlighted.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Highlight issue: Two menu items highlighted at the same time
When you say two menu items get highlighted at the same time, you mean “Contact” and “Home”? If yes, you'll need to make...
Read more >Keep parent menu item highlighted after hovering over ...
I would like to achieve that once the submenu is moused over, the corresponding (parent) menu item is highlighted as well. This never...
Read more >Multilevel Menu Design Best Practices
Always highlight the link on the main menu that corresponds to the page the user is on. If the current page is in...
Read more >Highlight Main Menu while hovering over sub-menu items
http://www.basicwp.com/ menu - highlighted - sub-menus -hover/ Simple CSS code to keep Main Menu item highlighted in navigation bar while hovering ...
Read more >Highlight parent menu items when viewing sub-pages
Highlighting menu items is an important way of indicating where they are on the structure of the site. It also reinforces the main...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, I will look at it as soon as I can. I am busy at the moment so it might take me some time…
Ok so leaving one RouteLink as ‘#’ and changing the other to ‘/’ it now works as expected (in the demo repo) Once I am back to work on Monday, I will update the project there with the RouterMatch code to see if it resolves the issue too.