vue.draggable.next icon indicating copy to clipboard operation
vue.draggable.next copied to clipboard

[Bug] Tag property not working for Vuetify components

Open mtdvlpr opened this issue 1 year ago • 4 comments

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

Step by step scenario

<draggable
        v-model="mediaItems"
        item-key="id"
        tag="v-list"
        group="media-items"
        @start="dragging = true"
        @end="dragging = false"
      >
        <template #item="{ element, index }">
             <media-item />
        </template>
</draggable>

Error message

Failed to resolve component: v-list
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 

Expected Solution

It should render the Vuetify v-list component.

mtdvlpr avatar Mar 07 '23 14:03 mtdvlpr

Having the same issue

OpNop avatar Mar 25 '23 00:03 OpNop

Same here, but with Quasar's QList.

[Vue warn]: Failed to resolve component: q-list
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.

Klikini avatar Jun 06 '23 23:06 Klikini

Seems like in general it cannot handle custom vue components and only deal with html tags, which is uncomfortable because this way you have to generate extra containers at places where you definitely don't want them

awacode21 avatar Jul 27 '23 15:07 awacode21

In case anyone needs this, I got it working this way:

<draggable
    ...
    tag="VTabs"
    :componentData="componentData"
>...</draggable>
import { VTabs } from 'vuetify/components/VTabs';
import draggable from 'vuedraggable';

draggable.components = { ...draggable.components, VTabs };

// ...

GrzegorzKazana avatar Sep 14 '23 06:09 GrzegorzKazana