Skip to content
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

fix(SideNav): don't change expanded state when it's controlled #14354

Closed
wants to merge 1 commit into from

Conversation

lamualfa
Copy link

@lamualfa lamualfa commented Jul 31, 2023

Related issues

The issue is closed but the problem still happened.

Changelog

New

  • Don't change the expanded state if the expanded prop is true or false.

Removed

  • Change the expanded state when the expanded prop is falsy value (undefined, false, null or 0). Make the SideNave close even if the expanded prop that passed is true.

Before

expanded prop already false. But the SideNav set its internal state to true. Make the SideNav open again.

Recording.2023-08-01.011522.mp4

@lamualfa lamualfa requested a review from a team as a code owner July 31, 2023 18:16
@github-actions
Copy link
Contributor

DCO Assistant Lite bot: Thanks for your submission! We ask that you sign our Developer Certificate of Origin before we can accept your contribution. You can sign the DCO by adding a comment below using this text:


I have read the DCO document and I hereby sign the DCO.


You can retrigger this bot by commenting recheck in this Pull Request

@netlify
Copy link

netlify bot commented Jul 31, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c2ad837
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/64c7fa6e7a63f70008466d33
😎 Deploy Preview https://deploy-preview-14354--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Jul 31, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c2ad837
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/64c7fa6e4d39680008d6cb87
😎 Deploy Preview https://deploy-preview-14354--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@tay1orjones
Copy link
Member

@lamualfa is there a way to test this in the storybook?

@lamualfa
Copy link
Author

@tay1orjones Nah, I'm not sure. I'll close this for a while.

@lamualfa lamualfa closed this Jul 31, 2023
@tay1orjones
Copy link
Member

@lamualfa feel free to put together a story just for temporary testing in the storybook in this PR. We can use it to test using the deploy preview and then it can be deleted before merging.

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

Successfully merging this pull request may close these issues.

2 participants