My team uses this component and it works great for small lists. We use the values given by the NewIndex to set as an order variable for that item on the list and update that list item accordingly. Then sort the list by the order number. When trying to do this for larger lists the NewIndex JSON value and the OldIndex JSON value are not correct and can be off by quite a bit. This then means that the wrong value is being assigned to the list item and after sorting the item does not appear where it should be.
I have attached an OML. In the SortableJSListOnDragEnd client action debug on the assign. You will see that the index numbers are correct for small movements in the list. But if you try and drag the top of the list to the bottom the index values are off.
Hi Spencer Buhler, thanks for sharing this issue!
I just looked a bit into it and it seems that the table is not rendered entirely in the beginning, but only the first 120 items.Since the sortable object is created in the OnReady event, probably only the first 120 items will be considered by the sortable.js library.
Hi @Spencer Buhler,
I'm thinking this is caused by list virtualization, so a workaround could be to disable that for this list.
I had a try with your demo oml, and can drag from 1 to 200+ without error
Dorine