mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +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()
|
|
},
|
|
}
|