Open rafalxyz opened 3 years ago
I had a similar problem. How about a workaround using dataIdAttr & sort function?
@dzero1 Thanks for answer. Should I just reorder DOM elements in on move event handler? I get strange behavior if I do that. Dragged element jumps between top and middle of the list when I move cursor.
I'm just changing the data-id of my elements. then call sort function of the sortablejs instance. In your case, I think you can use onEnd event. Just update each DOM element data-id and call the sort.
I have two lists (A, B) with disabled sorting. When I drag element from list A to list B, I'd like the dragged element to be pushed on top of list B even if mouse cursor is not on top of list B. Something like this: https://sortablejs.github.io/Sortable/#sorting-disabled but without the possibility to insert elements in the middle of the list on the right side.