SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.88k stars 530 forks source link

TypeError: Cannot read properties of undefined (reading 'header') #254

Open IrinaLuminesk opened 9 months ago

IrinaLuminesk commented 9 months ago

I currently getting this error on vue 3. This is my code image image

And this is the error show on my browser image

vladfr commented 8 months ago

Getting this too. And if you add the #header slot, you bump into other errors. It's because this.$scopedSlots is undefined, but I have no idea why. This happens only in very recent versions of Vue3. It didn't use to be like this before.

I'm on vue@3.4.19 and using Nuxt.

Interestingly enough, on Vue 3.4.15 with a default Vuetify setup, this library works with the same code.

bblumenfelder commented 7 months ago

Getting the same error, but I'm not willing to install Vuetify :) Did you find another solution?

zhelingwang commented 7 months ago

package version: "vue": "^3.4.21", "vuedraggable": "^4.0.1"

code:

<draggable :list="myArray" item-key="name" ghost-class="ghost" @start="drag = true" @end="drag = false">
        <template #item="{ element }">
            <div class="list-group-item">{{ element.name }}</div>
        </template>
</draggable>

"vuedraggable": "^4.0.1" 这个版本后我这边正常, 没有出现这个错误了

prashantnirgun commented 6 months ago

this still not work with "vuedraggable": "^4.0.1",

Lippiece commented 5 months ago

Updating Vue to latest will probably fix this, as it fixed mine.

ReljaMihajlovic commented 5 months ago

I fixed it by shutting down dev server and then running npm run dev again. "vue": "^3.4.27", "vuedraggable": "^4.1.0"

emirrozerr commented 5 months ago

I fixed it by shutting down dev server and then running npm run dev again. "vue": "^3.4.27", "vuedraggable": "^4.1.0"

Same here!

ecolovecat commented 4 months ago

Just shut down the server and then rerun. If still not work, install to the "vuedraggable": "^4.1.0", then rerun the server again

chenyajin commented 1 month ago

package version: "vue": "^3.4.21", "vuedraggable": "^4.1.0"

solution: delete node_modules and clean npm

it works for me!