Open dwickern opened 2 years ago
I'm running into the same issue.
It looks like directive support for Vue 3 was added in https://github.com/ndelvalle/v-click-outside/pull/563, after the latest published release (3.2.0, May 15 2022, https://github.com/ndelvalle/v-click-outside/commit/f525d4b393858d3a66414b1522be307be2e1ebf8).
@ndelvalle - any chance of an updated release?
I switched to this one instead: https://vueuse.org/core/onClickOutside
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);
},
});
It seems the release process stripped out all vue3-specific code.
https://www.runpkg.com/?v-click-outside@3.2.0/dist/v-click-outside.umd.js
^^ The hooks are hard-coded as
bind/update/unbind