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

[@mantine/core] SegmentedControl: remove initial active tab translation animation #1264

Merged
merged 2 commits into from
Apr 17, 2022

Conversation

achmurali
Copy link
Member

#1239 ... assuming we don't want initial transition on render, have done this. If it is to be avoided via a prop, shall do it

@rtivital
Copy link
Member

It's much better than it was before! There is still one issue remaining that is related to that – when page is refreshed, the active item is not highlighted until component mounts (see video). So, I'm proposing that we should add styles to the active item that match styles of the floating indicator and remove them after mount.

How to test this:

  • Make changes to component
  • npm run build @mantine/core
  • npm run docs:build && npm run docs:serve
  • Open SegmentedControl page and refresh it

P.S. do not forget about different supported colors.

2022-04-16.20.38.35.mov

@achmurali achmurali changed the title SegmentedControl: remove initial active tab translation animation [@mantine/core] SegmentedControl: remove initial active tab translation animation Apr 16, 2022
@rtivital rtivital merged commit c93b13e into mantinedev:master Apr 17, 2022
@rtivital
Copy link
Member

Works perfect, thanks!

@achmurali achmurali deleted the SegmentedControls branch April 17, 2022 12:06
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.

None yet

2 participants