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

Not working on vue3 #601

Open
dwickern opened this issue Sep 28, 2022 · 3 comments
Open

Not working on vue3 #601

dwickern opened this issue Sep 28, 2022 · 3 comments

Comments

@dwickern
Copy link

dwickern commented Sep 28, 2022

It seems the release process stripped out all vue3-specific code.

https://www.runpkg.com/[email protected]/dist/v-click-outside.umd.js

^^ The hooks are hard-coded as bind/update/unbind

@nextmat
Copy link

nextmat commented Oct 4, 2022

I'm running into the same issue.

It looks like directive support for Vue 3 was added in #563, after the latest published release (3.2.0, May 15 2022, f525d4b).

@ndelvalle - any chance of an updated release?

@dwickern
Copy link
Author

dwickern commented Oct 6, 2022

I switched to this one instead: https://vueuse.org/core/onClickOutside

@eviler007
Copy link

import vClickOutside from 'v-click-outside';
const { bind, unbind } = vClickOutside.directive;

app.directive('click-outside', {
  mounted(el, bindling) {
    bind(el, { value: bindling.value });
  },
  beforeUnmount(el) {
    unbind(el);
  },
});

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

3 participants