A
A
alexeeey_kuznetsov2019-12-17 11:42:09
JavaScript
alexeeey_kuznetsov, 2019-12-17 11:42:09

How to animate reverse method in js array?

There are elements in the array that, when you click on the sort descending/ascending button, need to be animated.
When changing sorting, I do this:
some_array.slice(). reverse()
I can't find anything similar on Google. Most likely there is some simple workaround or without using such an array reversal. I don't know if it's important that it's in the vue component, maybe you can think of something with transition-group.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dblearn94, 2019-12-17
@dblearn94

Well, implement sorting yourself and animate as you want, the simplest option
Graphics and logic - 2 separate entities.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question