-
Notifications
You must be signed in to change notification settings - Fork 552
Official example: Cannot set properties of null (setting '__draggable_context') #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
+1 |
Also running in to this on a Vue 3 project (on |
how to reslove |
Has anyone resolved this issue? |
This only seems to happen with Vue versions A workaround I've found so far is to NOT use the <template>
<Draggable
v-model="myArray"
itemKey="id"
:componentData="{
tag: 'div',
type: 'transition-group'
}">
<template #item="{element}">
<div>{{element.label}}</div>
</template>
</Draggable>
</template>
<script setup>
import {ref} from 'vue';
import Draggable from 'vuedraggable'
const myArray = ref([
{
id: 3,
label: 'third'
},
{
id: 1,
label: 'first'
},
{
id: 2,
label: 'second'
}
])
</script> |
Duplicate of #159 |
@ajdvoynos This doesn't work for tables, it's not allowing to set |
tag="transition-group" is outside the component data in the example <draggable if you delete tag="transition-group". it works even with script-setup syntax : Indeed tag is ignored its always a div but it does not matter at the moment I put the q-card in the template..... |
You are right! |
First check https://github.com/SortableJS/Vue.Draggable/blob/master/CONTRIBUTING.md
Jsfiddle link
Step by step scenario
Copy

vue.draggable.next
transition example in vue 3 project.Run...
Err!!!
The text was updated successfully, but these errors were encountered: