vue.draggable.next
vue.draggable.next copied to clipboard
[Bug] Tag property not working for Vuetify components
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.
Having the same issue
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.
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
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 };
// ...