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

The exiting animation on MultiValues doesn't look correct #4602

Closed
mengX666 opened this issue May 25, 2021 · 0 comments Β· Fixed by #4860 or #4892
Closed

The exiting animation on MultiValues doesn't look correct #4602

mengX666 opened this issue May 25, 2021 · 0 comments Β· Fixed by #4860 or #4892
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer

Comments

@mengX666
Copy link

Hi there πŸ‘‹
The current exiting animation on the multi values looks a bit janky, the demo below was recording on https://react-select.com/home
home

image
Click on "Perth" to remove it
↓
image
The 2nd "Perth" was removed, but the last 3 items ("Perth", "Darwin", "Melbourne") on the first pic were added to the end
↓
image
3. The last 3 items were removed

My assumption is the index was added to the key field in the <MultiValue> here. Every time a value get removed from the list, the index would change so the key of the MultiValue get changed as well, which causes the rerender πŸ€”

The index was add on v3.2.0, also made a codesandbox to verify that: https://codesandbox.io/s/sad-northcutt-3s5ce?file=/src/App.tsx
the animation looks good when using react-select v3.1.1 but not on v3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-confirmed Issues about a bug that has been confirmed by a maintainer
Projects
None yet
2 participants