azouaoui-med / react-pro-sidebar

React Pro Sidebar provides a set of components for creating high level and customizable side navigation
https://azouaoui-med.github.io/react-pro-sidebar/
MIT License
1.72k stars 412 forks source link

how to auto collapse other submenu when new one is clicked ? #190

Closed FlorianRuen closed 1 year ago

FlorianRuen commented 1 year ago

I'm using react-pro-sidebar@0.7.1, and I got a lot of elements in my navbar (with submenus) My question is : there is a way to close other submenus when new one is opened ?

Because for my use case, If the user open all submenu, it's no longer very readable and it forces him to scroll through the menu to find what he wants

I tried to look in the documentation, if a props on the Menu or SubMenu could help, but I couldn't find any Perhaps, if this is not possible natively, there is workaround to do it?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.