vue.draggable.next icon indicating copy to clipboard operation
vue.draggable.next copied to clipboard

Add `compatConfig` to draggableComponent

Open snoozbuster opened this issue 3 years ago • 4 comments

Closes #57. The Draggable component is designed to work under vue 3, but because it doesn't provide a local compatConfig override, applications using @vue/compat will render the component in whatever compatibility mode the host application has been set to. In particular, things like INSTANCE_SCOPED_SLOTS and RENDER_FUNCTION will cause invocations of this.$slots.item(props) to invoke the item slot without props (to maintain the legacy meaning of invoking a $slot), which will crash.

We can configure the component to indicate that it is fully Vue 3 compatible so that it "just works" for folks using the compatibility build.

snoozbuster avatar May 20 '22 18:05 snoozbuster

Could you merge this PR @David-Desmaisons, if possible.

mylemans avatar Jul 13 '22 09:07 mylemans

Hope you can merge this soon

walmon avatar Oct 13 '22 19:10 walmon

I've just discovered this the hard way. I was seeing errors like this.componentStructure is undefined in the console and traceback text was appearing in place of the component. Neither error had an obvious cause, so I made a local fork and started debugging and then this finally occurred to me. I added the same compatConfig and all was resolved.

This workaround works for me:

import draggable from 'vuedraggable'
draggable.compatConfig = { MODE: 3 }

mmulqueen avatar Jun 29 '23 10:06 mmulqueen