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

Transition-group transition on empty array #4900

Closed
wbijker opened this issue Feb 10, 2017 · 4 comments
Closed

Transition-group transition on empty array #4900

wbijker opened this issue Feb 10, 2017 · 4 comments
Labels

Comments

@wbijker
Copy link

wbijker commented Feb 10, 2017

Vue.js version

2.1.10

Reproduction Link

https://jsfiddle.net/z11fe07p/686/#

Steps to reproduce

There seems to be an issue with the transition-group component when transitions is applied on each element iterating on a v-for with an initial empty array.

Whenever you add (push) an item to the array before the previous transition is completed all previous transition will stop. But if you wait for the first transition to finish - but only on the first instance - and then try to add items all works as expected. Similar, if you fill the initial array with 1 or more values, all works as expected.

What is Expected?

All items should continue to animate.

What is actually happening?

Animation stops for all elements except for the last one added.
It seems that Vue detects a change in position and therefore replace all transition classes with the move class.

@Kingwl
Copy link
Member

Kingwl commented Feb 10, 2017

i'm so sorry for my three pr
i make some mistake

@posva
Copy link
Member

posva commented Feb 10, 2017

hey, no need to apologise 😄
Thanks for taking the time to make a PR

@Kingwl
Copy link
Member

Kingwl commented Feb 10, 2017

@posva
i cannot recurrent that when i write the unit test because the transition is in .test it is always been set
i try to move transition from .wave-enter-active to .item then it work fine
so is this still a bug
https://jsfiddle.net/z11fe07p/706/

@posva
Copy link
Member

posva commented Feb 11, 2017

@Kingwl Sorry for the delay. I believe it's a bug because if you wait for the first transition to finish there's no problem with the rest of the animations. It only happens if you add many items on the empty array without waiting for the first transition to finish. I'll check and see if I can help out 🙂

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

No branches or pull requests

4 participants