akveo / nebular

:boom: Customizable Angular UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/nebular
MIT License
8.04k stars 1.51k forks source link

NbSidebar: menu item toggled when expanding sidebar #630

Open yggg opened 5 years ago

yggg commented 5 years ago

Issue type

I'm submitting a ... (check one with "x")

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:

  1. Go to ngx-admin.
  2. Shrink viewport to the size when sidebar is compacted.
  3. Click on any menu item which has submenu.
  4. Collapse sidebar.
  5. 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"
lexzhukov commented 5 years ago

The issue is not reproducing in the Nebular 2.0.1 version.

efuturetoday commented 5 years ago

@lexzhukov Bug still present (version 3.0.0). Please check current demo page.

bppn commented 5 years ago

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.

DannydeJong commented 2 years ago

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:

Expected behaviour:

abelokon0711 commented 2 years ago

Any information when this will be merged?