javascriptvue.jssortablejs

SortableJs will reorder elements after get actual position from backend


how I can update current position element, after get this information from server? I have array with elements, and store method, but after render component I can't reorder elements in list, only manual method move elements.

I'm was try use store, but this don't help me.


Solution

  • I see what I did.

    1. Sort the array the way we need it
    2. Init SortableJS.

    I originally initialized the library first and only then sorted the elements, so that didn't work.