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

[core] fix(Tabs): don't animate tab indicator on first render #4275

Merged
merged 2 commits into from
Aug 11, 2020
Merged

[core] fix(Tabs): don't animate tab indicator on first render #4275

merged 2 commits into from
Aug 11, 2020

Conversation

ejose19
Copy link
Contributor

@ejose19 ejose19 commented Aug 10, 2020

Changes proposed in this pull request:

Skips animation transition during first render, as when working on controlled mode the selected tab may not be the first one, and there's a transition to the selected tab which shouldn't appear.

Here's a sandbox, either click codesanbox refresh or the refresh button to see the issue.

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I just had some minor code style suggestions to make the implementation a little easier to read / comprehend.

packages/core/src/components/tabs/tabs.tsx Outdated Show resolved Hide resolved
packages/core/src/components/tabs/tabs.tsx Outdated Show resolved Hide resolved
packages/core/src/components/tabs/tabs.tsx Show resolved Hide resolved
packages/core/src/components/tabs/tabs.tsx Outdated Show resolved Hide resolved
@adidahiya adidahiya changed the title refactor: remove animation transition on tabs during first render [core] fix(Tabs): don't animate tab indicator on first render Aug 11, 2020
@adidahiya adidahiya merged commit 2066e54 into palantir:develop Aug 11, 2020
@ejose19 ejose19 deleted the ej/remove-tabs-initial-animation branch August 11, 2020 18:33
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