SortableJS / Vue.Draggable

Vue drag-and-drop component based on Sortable.js
https://sortablejs.github.io/Vue.Draggable/
MIT License
20.16k stars 2.9k forks source link

does disabling sorting really work? I want to drag between groups, but not sort #1006

Open Madd0g opened 3 years ago

Madd0g commented 3 years ago

Step by step scenario

Disabling sorting with param:

<draggable :sort='false' v-model='list' group="grouped">

Expected Solution

Expecting dragging only to work between lists, but dropping elements in the same group reorders them. From looking at the code, I see code calculating and updating indexes, but I don't see anything checking that sort option.

Thanks

jaumebalust commented 3 years ago

Hi, It works for me!

maybe try posting all the component?

Marchiuzzz commented 3 years ago

I have the same issue, however it works for me until I add event listeners, which for some reason disable the functionality of "sort" prop and when inspecting the draggable item, I see that "sort" becomes passed as attribute instead of prop.

This works

<draggable tag="div" class="row m-0" v-model="collections" :sort="false" group="collections">
                     ...
</draggable>

This doesn't

<draggable tag="div" class="row m-0" v-model="collections" :sort="false" group="collections" @start="myFunction">
                     ...
</draggable>
MariusSpring commented 3 years ago

Works for me :). Running latest version?

Marchiuzzz commented 3 years ago

Well I just moved to using the Sortbale.js itself since this was bugging out for me, works fine on Sortbale.js

antsteyeragorize commented 11 months ago

I have the same issue with the latest version