Transition-group swallowing updated lifecycle hook
Version
2.6.14
Reproduction link
Steps to reproduce
PART 1:
- Create a reactive array of items
- Create a v-for list with :key in a component looping over the array
- Have something happen in the onUpdated lifecycle. (Console.log will do)
- Update the array
PART 2 Wrap the the v-for in a Transition-group
What is expected?
Part 1 onUpdated lifecycle executes.
Part 2 onUpdated lifecycle executes.
What is actually happening?
Part 1 onUpdated lifecycle executes.
Part 2 onUpdated lifecycle DOES NOT execute.
If another part of the component outside of the transition-group is updated and re-rendered the Updated lifecycle executes as expected. I was just trying to add some transition to a couple of pages. Both had lazy loading images in the onUpdated lifecycle. Just wrapped my lists inside a transition-group. Everything worked fine on page A, but page B wasn't executing image loading when the list was updated even though the code was essentially the same as page A. Finally realized page A was also re-rendering something outside the transition-group allowing the onUpdated to execute for page A.
Duplicate of https://github.com/vuejs/vue-next/issues/2828