Closed jenjen75 closed 3 years ago
When working with slot inside tempate #item, draggable doesnt work. Slot elements are rendered but I cannot drag & drop
slot
tempate #item
<draggable v-model="myArray" group="people" @start="drag = true" @end="drag = false" item-key="id" > <template #item="{ element }"> <slot name="default" v-bind="{ element }" /> </template> </draggable>
As workaround, I wrap into slot a div to make it work.
div
<draggable v-model="myArray" group="people" @start="drag = true" @end="drag = false" item-key="id" > <template #item="{ element }"> <div> <slot name="default" v-bind="{ item: element }" /> </div> </template> </draggable>
Sorry for not providing jsfiddle, I can't generate (see #23 )
Item should be element with only one root, this is why you need to add the extra div. Consider it as a permanent limitation.
it's work! Thanks
When working with
slot
insidetempate #item
, draggable doesnt work. Slot elements are rendered but I cannot drag & dropAs workaround, I wrap into
slot
adiv
to make it work.Sorry for not providing jsfiddle, I can't generate (see #23 )