Skip to content

Fix sidebar issues hapenning when changing from sidebar-narrow-unfoldable desktop to mobile #367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

maarlo
Copy link

@maarlo maarlo commented Jul 4, 2023

Hi!

When the sidebar is visible in unfoldable state and the browser is reduced until modile dimensions, there is a strange animation which occurs due to margin-left differencies.

After researching about this topic, I concluded that the main issue is caused by the visible state of the CSidebar because it is the same for Desktop and for Mobile.

I manage to fix the code by creating a new state called mobileVisible which is False by default and it is only modified when the browser has mobile dimensions. It notifies all the visible changes to component by the onVisibleChange function, so it continious working properly and the annoying effect disappears.

@maarlo
Copy link
Author

maarlo commented Jul 9, 2023

What are your thoughts @mrholek ?

@maarlo
Copy link
Author

maarlo commented Jul 12, 2023

Indeed, the issue also happens on coreui-free-react-admin-template

@github-actions
Copy link

This PR 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant