mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-21 23:37:55 +00:00
13 lines
315 B
JavaScript
13 lines
315 B
JavaScript
import { onClickOutside } from '@baserow/modules/core/utils/dom'
|
|
|
|
export default {
|
|
bind(el, binding, vnode) {
|
|
el.onClickOutsideEventCancelDirective = onClickOutside(el, (target) => {
|
|
vnode.context[binding.expression](target)
|
|
})
|
|
},
|
|
unbind(el) {
|
|
el.onClickOutsideEventCancelDirective()
|
|
},
|
|
}
|