Vue.draggable: Using header slot offsets dragged item

Created on 23 Oct 2019  路  3Comments  路  Source: SortableJS/Vue.Draggable

Related to #530

Jsfiddle link

https://jsfiddle.net/2q7kbcfv/2/

Step by step scenario

Use header slot in your first list
Drag item from first list to second list

Actual Solution

Item dragged to second list does not match item dragged

Expected Solution

Item dragged to second list should match the item dragged from the first.
Works without the header slot:
https://jsfiddle.net/2q7kbcfv/3/

vue 2.6.10
sortable 1.10.1
vuedraggable 2.23.2

Most helpful comment

Hey guys, I had the same issue and managed to solve it by placing the declaration of the header slot after the draggable elements, but still inside the draggable tag.

https://jsfiddle.net/rafaelpaixao/6z0f9x1o/2/

The documentation actually implies that the header should come after the elements. But I don't know if that was by intent.

All 3 comments

U can just put the header outside the list to achieve what you want.

https://jsfiddle.net/mxLohbvd/

Hey guys, I had the same issue and managed to solve it by placing the declaration of the header slot after the draggable elements, but still inside the draggable tag.

https://jsfiddle.net/rafaelpaixao/6z0f9x1o/2/

The documentation actually implies that the header should come after the elements. But I don't know if that was by intent.

Thanks for this @rafaelpaixao I will check and update the documentation.

Was this page helpful?
0 / 5 - 0 ratings