Sortable on virtual List

Any one having similar issue about using sortable list on VL?

I have a VL created from items via pouchdb. I would like to trigger a sortable:sort event to review the new VL items order so I can update the db and let it display the correct order when next reloaded.


when i trigger an event for sortable:sort and generate a function (event, index),

I notice that list item moving downward is ok. eg. index shows {from: 0, to: 1} and subsequently say {from: 1, to: 3}.

However, if any item moving upwards. index will show {from: 1, to: 0} or {from: 3, to: 0} even if the item is not moving to the first position. By moving up, I also somehow lose the sorting handler.

Any advice?