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

"open" prop do nothing on controlled mode #187

Closed yarinsa closed 1 year ago

yarinsa commented 1 year ago

Describe the bug I am using Next.js and I want to connect the state of sidebar pro with Next router. I am managing the logic of the active submenu on the application side, and holding state of the "open submenu". onSubMenuOpen (true) I am setting this submenu open and the others open={false}

Actual: Nothing happened.

To Reproduce See reproduction here https://codesandbox.io/p/sandbox/thirsty-leakey-xxjcrs

Expected behavior Expected: when false is passed the submenu will close itself

Screenshots

https://github.com/azouaoui-med/react-pro-sidebar/assets/44482362/1de95ce1-20a7-47f1-a8c4-ed3f292f7573

Desktop (please complete the following information):

Additional context Seems like the chevaron icon does comply to the change. It's only the "collapse" that doesnt.

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.