M
M
Max Zhukov2020-11-09 12:49:19
React
Max Zhukov, 2020-11-09 12:49:19

Is there any library for sorting items in a list with animation?

Is there any library for sorting elements in a list with animation compatible with react-virtualized?
You need to make an animation that will move the selected item to the top of the list.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
twolegs, 2020-11-09
@twolegs

Virtualized lists are quite difficult to animate, because you don't have full control over the list (items outside the window are not mounted).
You have three options:
1. Don't use `react-virtualized`. Then the animation is solved trivially, there are a lot of libraries for this. But this method only works for small lists.
2. Try using something like `framer-motion`. But in this case, there are no guarantees that the animation will work without artifacts, because. `react-virtualized` controls the state of your list quite tightly.
3. Don't use animations at all. If the list is so large that virtualization needs to be used, then it will be quite difficult to make a movement animation that looks good (for example, a list of 1000 elements, and the last element needs to be moved to the top).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question