Answer the question
In order to leave comments, you need to log in
Intersection Observer not firing for new items in list (vue)?
An example is here.
Everything works fine for elements that were at the time of the created hook, that is, at the time the component was created, but when a new element is added (in the example, the PUSH NEW button), the Observer does not work.
Answer the question
In order to leave comments, you need to log in
https://ru.vuejs.org/v2/api/#key
If you add it, everything works.
And yes, the index from v-for cannot be used in this case. Do an ascending sequence with a separate counter and a field in the object, like todo.key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question