1

The normal behavior of the Vue.Draggable is to sort/move the elements while they are being dragged.

I want to disable this and sort only once the element is dropped somewhere.

For a visual representation. Here is the current/normal behavior: vue.draggable behavior

And here is a gif of the expected behavior: drag and drop expected behavior

There is a plugin to change some of the functionality of the SortableJS library, its name is "Swap", it stops the elements movement while dragging, but once dropped, the elements get swapped, which is not what I want.

Any ideas?

I do not understand where these elements are stored. Basically, there is a data property, which is a list of the sortable elements. It is interesting that, while dragging, visually, the elements are rearranged, but regarding the data property, every element stays at its original index and nothing is changed.

Where is that change in the order happening?

1
  • After going through the issues in the SortableJS library to look for someone with my case, I came a cross a comment from a member of the library stating that this movement can't be disabled. This was after numerous attempts to remove this "sliding" effect. The only "way" is to use the "swap" plugin, but it changes the behavior of sorting to swapping, which isn't something that I want also. Commented May 20, 2023 at 11:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.