nebular
nebular copied to clipboard
NbSidebar: menu item toggled when expanding sidebar
Issue type
I'm submitting a ... (check one with "x")
- [x] bug report
- [ ] feature request
Issue description
When sidebar is compacted, clicking on menu item with submenu causes menu item toggling.
Current behavior: Menu item 'expanded' state changed after each click.
Expected behavior: Clicked menu item should always be expanded.
Steps to reproduce:
- Go to ngx-admin.
- Shrink viewport to the size when sidebar is compacted.
- Click on any menu item which has submenu.
- Collapse sidebar.
- Repeat steps 3 and 4 several times.
Every time menu item has a different state.
Related code: https://github.com/akveo/nebular/blob/7542d5ed11a6556b7a91c4209e58a878daed37fa/src/framework/theme/components/sidebar/sidebar.component.ts#L296 https://github.com/akveo/nebular/blob/7542d5ed11a6556b7a91c4209e58a878daed37fa/src/framework/theme/components/menu/menu-item.component.html#L36
Other information:
npm, node, OS, Browser
any
Angular, Nebular
@nebular/theme: "2.0.0-rc.10"
The issue is not reproducing in the Nebular 2.0.1 version.
@lexzhukov Bug still present (version 3.0.0). Please check current demo page.
In the current implementation, the sidebar and menu are not aware of each other. The current behavior is not very nice, looks like a bug.
This is still an issue. It is also present in the demo https://www.akveo.com/ngx-admin/pages/iot-dashboard
Setting up the situation:
- A menu component inside a sidebar component (the intended use for these components)
- The menu has a submenu
- The submenu is open
- User collapses the sidebar, hiding the items inside the submenu but leaving the button for the submenu toggle The problem:
- If the user clicks on the submenu it opens the sidebar but collapses the submenu
Expected behaviour:
- If the user clicks on a submenu in a collapsed sidebar it should open the sidebar and the submenu, not "toggle" the submenu
Any information when this will be merged?