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(tabs): do not unmount tab content when lazy #3763

Merged
merged 2 commits into from
Apr 9, 2021
Merged

fix(tabs): do not unmount tab content when lazy #3763

merged 2 commits into from
Apr 9, 2021

Conversation

stellarhoof
Copy link
Contributor

fix(tabs): do not unmount tab content when lazy

Closes #3683

📝 Description

Tabs' isLazy behavior is now to mount on first select and never unmount.

⛳️ Current behavior (updates)

Current behavior is to unmount on navigating away from a tab.

🚀 New behavior

Tabs' isLazy behavior is now to mount on first select and never unmount.

💣 Is this a breaking change (Yes/No):

No

@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2021

🦋 Changeset detected

Latest commit: 96fabe3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@chakra-ui/tabs Patch
@chakra-ui/react Patch
@chakra-ui/test-utils Patch
@chakra-ui/props-docs Patch
@chakra-ui/docs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/chakra-ui/chakra-ui/7wxLi15y9Z93RA5gSUYqpCLD1pHv
✅ Preview: https://chakra-ui-git-fork-stellarhoof-fix-lazy-tabs-chakra-ui.vercel.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 7, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 96fabe3:

Sandbox Source
create-react-app-ts Configuration

@segunadebayo
Copy link
Member

segunadebayo commented Apr 8, 2021

Hi @stellarhoof,

Thanks for this. Want to update the test to match the new behavior?

@stellarhoof
Copy link
Contributor Author

stellarhoof commented Apr 8, 2021

I saw the failed build but assumed it was something else. Didn't think you had such granular tests. 👍

@stellarhoof
Copy link
Contributor Author

@segunadebayo Done

@segunadebayo
Copy link
Member

Great work!

Sorry to bother you but if you could extend this update to the use-popover hook as well, that would be fantastic! It also uses the `isLazy prop.

@segunadebayo segunadebayo merged commit bf7bc7e into chakra-ui:main Apr 9, 2021
@github-actions github-actions bot mentioned this pull request Apr 9, 2021
@stellarhoof
Copy link
Contributor Author

stellarhoof commented Apr 9, 2021

@segunadebayo I'll make a different PR for the popover then since you merged this one.

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.

Tabs isLazy behavior
2 participants