-
Notifications
You must be signed in to change notification settings - Fork 531
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
error with item-key: componentStructure.js:3 Uncaught TypeError: Cannot set properties of null (setting '__draggable_context') #159
Comments
It looks like it only does that when you try to use |
I'm not sure why this error occurs, but the current work around fix I'm personally using is as follows:
You don't need to have |
Hi @xbanki I'm facing the same issue and not clearly understand your answer. Could you please put an example of your comment ? Thank you very much for your time. |
right answers:
tips: Do not set tag=transtion-group, You should set component-data={type: 'transtion-group'} will be right。 |
Tried out your suggestion but still not working in my case. Thanks for your help : <draggable
v-model="teams"
:component-data="{
name: 'fade',
type: 'transition-group',
}"
item-key="idteam"
class="grid sm:grid-cols-3 xl:grid-cols-4 grid-cols-2 gap-6"
>
<template #item="{ element, index }">
<my-team
:key="element.idteam"
:id="element.idteam"
:name="element.teamName"
:index="index"
@getTeams="getTeams"
></my-team>
</template>
</draggable> |
Yes, i tried that too and didnt work on me too. I using nuxt 3 btw. It only happening when add |
it works.Thanks a lot! |
same problem on my demo. |
For those who still run into this issue, see issue #180 that was opened above for a working example that is in-line with my previous suggestion. |
#145 fixed this but not to be merged 😮💨 As a temporary solution:
|
Adding
item-key="id"
doesnt work, it throws this error:When you omit the item key it throws a warning that you need to include the item key prop. So its a catch-22. The items in my case have
id
property, but using that here, like in the examples on this repo, it doesn't work.As an example to what I'm using:
The text was updated successfully, but these errors were encountered: