Skip to content
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

Closed
nitwhiz opened this issue May 14, 2019 · 3 comments
Closed

Vue 2.6+ new v-slot syntax: header disappears when list gets empty #633

nitwhiz opened this issue May 14, 2019 · 3 comments

Comments

@nitwhiz
Copy link

nitwhiz commented May 14, 2019

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 the header slot as <template> - as the v-slot syntax expects it to be a template - and a the end of our <draggable>, as DND won't work at all if this template defined is before the v-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.

@David-Desmaisons
Copy link
Member

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.

@nitwhiz
Copy link
Author

nitwhiz commented May 16, 2019

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/

David-Desmaisons added a commit that referenced this issue Jun 23, 2019
@David-Desmaisons
Copy link
Member

Corrected in version 2.23.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants