You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi i have a question about the menu sidebar on ngx-admin.
I was trying to make the expand and collapse more intuitive bases on the last action made by the user, i mean if the user collapsed or compacted it, the next time he enters the page the sidebar will be collapsed or compacted. I made and idea of it but now i have troubles trying to avoid that when the user clicks a menu item to go to another section, if the menu sidebar was compacted then it expands. Thats a native action from the menu item component?. how can i avoid it from expanding when clicking a menu?
The text was updated successfully, but these errors were encountered:
At the moment from what I know you can set the default state, and you can set subMenus to auto collapse. For ur case there is no prebuild function inside of the code.
The function that expands the sidebar seems to be inside of the nebular package, which cant be changed easily by ourself.
Either you run the collapse function after the expand finished or eventually its possible to "unsubscribe" from the expand function.
It should be easy possible to make an onchange event for nb-sidebar with if class = expanded -> set class collapsed
Ty for your answer @darklinki that helped me a lot.
At the moment im hiding the sidebar after the user select a menu item by subscribing to the MenuService's onItemSelect. Its ugly because it resizes the main layout content each time it expands so i have to make the sidebar hover it now i guess.
Hi i have a question about the menu sidebar on ngx-admin.
I was trying to make the expand and collapse more intuitive bases on the last action made by the user, i mean if the user collapsed or compacted it, the next time he enters the page the sidebar will be collapsed or compacted. I made and idea of it but now i have troubles trying to avoid that when the user clicks a menu item to go to another section, if the menu sidebar was compacted then it expands. Thats a native action from the menu item component?. how can i avoid it from expanding when clicking a menu?
The text was updated successfully, but these errors were encountered: