-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed
Description
Version
2.5.17
Reproduction link
https://codepen.io/megacromulent/pen/gdMYLx?editors=1010
Steps to reproduce
- Create vue app with items displaying in a list.
- Add transition group with v-for with format like v-for="(item, index) in items"
- Use "index" from v-for as the v-bind:key (like: v-bind:key="index" )
- Add and remove items from the data.
What is expected?
The item being removed/added should have the transition applied to it.
What is actually happening?
The last item in the list gets the transition applied.
This may be an old bug, as I was hunting for a solution to my problem, I ran into this from May 2017:
https://stackoverflow.com/questions/43598308/vue-js-wrong-transition-group-animation-position
If this is the intended behavior using index as the key, then can their be at least a warning message in the dev version of Vue.js to explain this? Or perhaps searchable text in the documentation with something like "only last item in list is animating/transition applied" so a solution can be found without thinking there is a bug in Vue.js.
amybrowncole, tonoyandev, fredrivett, tscandalitta and sudofoxtscandalitta
Metadata
Metadata
Assignees
Labels
No labels