azouaoui-med / react-pro-sidebar

React Pro Sidebar provides a set of components for creating high level and customizable side navigation

Home Page:https://azouaoui-med.github.io/react-pro-sidebar/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Initial collapsed state is always false on the initial render

ocimer opened this issue · comments

commented

Describe the bug
Initial state of the collapsed value is always false on the initial render (only), even when "defaultCollapsed" prop is set.

To Reproduce
Steps to reproduce the behavior:

  1. Go to sanbox
  2. Refresh the page in the web view area and observe the console and the web view area.
  3. In the web view you will clearly see a jump from not collapsed to collapsed on page refresh, and the console will output "false" on initial render and "true" after.

Expected behavior
With the "defaultCollapsed" prop set I expect the sidebar to be collapsed even on the initial render.

Desktop (please complete the following information):
Any modern browser

2023-04-12.15-03-36.mp4

same here, im using defaultCollapsed true and this happends when i refresh the page with f5 or i enter the first time.

commented

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.