SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

Insufficient getComponentData, header and footer slots #250

Open AlexanderMtchedlidze opened 11 months ago

AlexanderMtchedlidze commented 11 months ago

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

Jsfiddle link

Step by step scenario

You should have some way of getting a current iteratable item or its index in the header or footer slots, you don't always have a case where you just use an item slot. Imagine a scenario where you have an accordion component and must display some data in an expandable part based on the items. or in componentData you have some props that are calculated per specific item using the index or item itself.

Actual Solution

To fix this problem you are required to have an additional layer in between them, which makes it difficult to get the parentNode or other data because the draggable component wraps it in another div.

Expected Solution

Make componentData header and footer slots to receive an item so they can become more flexible.