-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Vue 2.6+ new v-slot syntax: header disappears when list gets empty #633
Comments
The fiddle dependencies are not updated, update the example with sortable 1.8.0 and vue.draggable 2.20.0 and see if the problem still occurs. |
I'm using the latest versions in my app, where it appeared first. Still happens with Sortable 1.8.4 & Draggable 2.20.0: https://jsfiddle.net/43ohx1bq/ |
Corrected in version 2.23.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jsfiddle link
https://jsfiddle.net/xyngqdet/6/
Step by step scenario
Vue 2.6 introduces a new
v-slot
format. When using it with Vue.Draggable (see fiddle), we need to define theheader
slot as<template>
- as thev-slot
syntax expects it to be atemplate
- and a the end of our<draggable>
, as DND won't work at all if thistemplate
defined is before thev-for
.When pressing delete again, even though the list is empty, the header will disappear. (In this fiddle the header comes back when adding new elements, this does not happen in my real app thought - nothing is rendered there, even if elements are added).
When setting the list empty twice (as in it is empty but you set it empty again), the header disappears, too.
Actual Solution
Everything works fine with the older slot syntax, that's why I think Vue.Draggable has a problem with the whole
template
thing.Expected Solution
Make the new 2.6
v-slot
syntax work.The text was updated successfully, but these errors were encountered: