Sidebar items without submenu are crashing
stinehso opened this issue · 0 comments
stinehso commented
Describe the bug
Sidebar component is crashing on the code line element.parentElement.querySelector("[aria-expanded=true]").setAttribute("aria-expanded", "false");
when selecting an item/ leaf without their own submenu, and then selecting another item on the same level.
Routing still works fine, but the menu item is not marked as selected, and you also have to click twice to open a submenu because of this.
To Reproduce
Steps to reproduce the behavior:
- Go to demo in dg docs
- 'Home page' is selected by default
- Click on 'Get started'
- See error in console
- Click again on 'Get started' and the menu will open
Expected behavior
Expected any menu item to show up as selected and open menu after one click
Actual behavior
It looks like no menu item is selected, and you have to click twice to see selection
Screenshots