kornelski / slip

Slip.js — UI library for manipulating lists via swipe and drag gestures
BSD 2-Clause "Simplified" License
2.44k stars 213 forks source link

[Question] Programmatically trigger Slip actions #93

Open itaditya opened 7 years ago

itaditya commented 7 years ago

Hey there awesome work with the plugin. I want to trigger a rearrange of list via my js code and not from the user interaction.

Basically I have to just use the pushing-out of other elements effect so that when I programmatically move one item to the top, it does so by moving up and pushing the upper elements downwards. Can this be done with Slip.

kornelski commented 7 years ago

There's no function for this. You could try to copy code of reorder state's onEnd().

itaditya commented 7 years ago

Ok