SortableJS / Vue.Draggable

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

Reordering with Non-draggable elements #404

Open satgi opened 6 years ago

satgi commented 6 years ago

First check https://github.com/SortableJS/Vue.Draggable/blob/master/CONTRIBUTING.md

Jsfiddle link

https://jsfiddle.net/satgi/r8hr7jqs/

Step by step scenario

drag FFF in front of CCC, FFF jumps to the first place instead of staying behind BBB while AAA & BBB are non-draggable

Actual Solution

Expected Solution

huyanyawei commented 6 years ago

The same problem, is it solved? I met too

David-Desmaisons commented 6 years ago

Turns out that current limitation is that vue.draggable won´t work when using "draggable" option to trigger "dragabbility." You should use move function to get the same result.

satgi commented 6 years ago

@David-Desmaisons Thanks for replying.

Jsfiddle Updated

https://jsfiddle.net/r8hr7jqs/18/

There's no index or element in property relatedContext.

moody4 commented 5 years ago

Any updates on the issue? Move function is rather a patch than a real solution — non-draggable items still can be shifted inside an array by the others items. I found out that 'draggable' option works well with sortablejs@1.4.2. Hope this will help somehow.

https://jsfiddle.net/sqssmhtz/2901/