How to apply animation to a newly added item to the "beginning" of a virtual list #693
Unanswered
hoffnung8493
asked this question in
Q&A
Replies: 1 comment
-
If you use unique ids for the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a list (ex.
[1, 2, 3]
) and this list gets updated at zero index (ex. updated list after a few seconds:[0, 1, 2, 3]
)So this zero would appear at the top of the rendered list. It does work correctly.
Now I want to apply animation to the newly added item, so that its clear to the user that this was newly added. It works if I append new items at the end of the array (updated array: [1,2,3,4]), but it does not work in my case, where I want to append a new item at the very beginning.
Also I realized that the animation would take effect to other items when I scroll away and scroll back due to virtualization. But I only want animation for the new ones, so I have added some basic condition. Based on the condition, only the new item's background is set to red, which is applied properly. But the animation doesnt work for some reason..
Below is the minimum code snippet:
Beta Was this translation helpful? Give feedback.
All reactions