Open GuilhermeErmel opened 1 year ago
Hi,Im guessing you need this:Code Sandbox Playground,and vue dynamic slot names
I just had the same problem, seems like sortablejs can't create the appropriate data tags on a slot (data-draggable="true"
).
Workaround would be to create an additional component in the slot:
<draggable
... attributes ...
>
<template #item="dragProps">
<div> <------------- NEEDS THIS !
<slot v-bind="dragProps" />
</div>
</template>
</draggable>
It also doesn't seem to play nicely if your draggable=".foo"
prop targets an element inside the nested slot
Did you solve it?
Any news on this? @cpannwitz solution does not work for me, as I am using this inside a table and a div would not fit.
Thanks!
Description
When I create my own draggable component using a slot inside the slot named "item", the draggable functionality doesn't work.
This is a bug or I'm doing something wrong?
codesandbox link
https://codesandbox.io/s/strange-sammet-6icdhq?file=/src/components/MyDraggable.vue:69-74