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

Add compatConfig to draggableComponent #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snoozbuster
Copy link

@snoozbuster snoozbuster commented May 20, 2022

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.

@mylemans
Copy link

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

@walmon
Copy link

walmon commented Oct 13, 2022

Hope you can merge this soon

@mmulqueen
Copy link

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 }

@sgloe
Copy link

sgloe commented Aug 10, 2024

A merge would be very welcome @David-Desmaisons
@mmulqueen, this will only work for runtime flags and not for compile flags.

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

Successfully merging this pull request may close these issues.

Getting some strange render error directly in template DOM
5 participants