You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Programmatically move an element (and trigger FLIP animation) #1954
Failure to comply may have your issue automatically closed.
Summary
Please answer the following questions in sentences.
What is the feature?
There should be a way to programmatically move a single element in the array in a way that triggers the animations. SortableJS has great FLIP animation functionality that happens while dragging. It also has a .sort() function which allows you to sort the elements, but it does not animate. I realize that it would a lot to coordinate animation during .sort() (although that would be nice). But I'm guessing that it would/should be easy to move a single item from one place in the list to another in a way that triggers the animation.
Why is having this feature important to you?
I'm working on an Electron application which offers menu items to move elements. But the "jumping" items is bad UX. If I can't do this with Sortable, I'll need to add another library to my project to get this type of functionality.
Who else will find having this feature helpful?
Anyone who wants to use SortableJS in a complex UI with more accessible ways of "dragging" elements (perhaps for those with mobility issues).
I actually in need of this feature too. Recently, I have been trying to find a way to programmatically move an item to another list for some auto movement feature I'm trying to build. Pretty sad to find out you there's not such way to do that.
It seems like the main reason to add this feature is for accessibility. This could provide animated fallbacks for javascript (probably keyboard event) manipulation of the list.
Hello Googlers! If you're stumbling across this while searching for Sortable FLIP or similar, it appears that this is now accomplished through the useAnimation boolean argument of the .sort() function:
Activity
athif23 commentedon Nov 4, 2020
I actually in need of this feature too. Recently, I have been trying to find a way to programmatically move an item to another list for some auto movement feature I'm trying to build. Pretty sad to find out you there's not such way to do that.
jjeff commentedon Nov 8, 2020
It seems like the main reason to add this feature is for accessibility. This could provide animated fallbacks for javascript (probably keyboard event) manipulation of the list.
See also #1951 which references #1176.
#1954: Add useAnimation option to sort()
owen-m1 commentedon Jan 8, 2021
Added
jjeff commentedon Jan 8, 2021
Hello Googlers! If you're stumbling across this while searching for Sortable FLIP or similar, it appears that this is now accomplished through the
useAnimationboolean argument of the.sort()function:Thanks @owen-m1!
SortableJS#1954: Add useAnimation option to sort()