From 0b511f8000e4713fde26da8e4c2f230a28441c78 Mon Sep 17 00:00:00 2001 From: Shay Yzhakov Date: Sun, 15 May 2022 12:38:10 +0300 Subject: [PATCH] added dismissable watch --- src/components/overlaypanel/OverlayPanel.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/overlaypanel/OverlayPanel.vue b/src/components/overlaypanel/OverlayPanel.vue index f84899501..3bc48ae72 100755 --- a/src/components/overlaypanel/OverlayPanel.vue +++ b/src/components/overlaypanel/OverlayPanel.vue @@ -57,6 +57,15 @@ export default { visible: false } }, + watch: { + dismissable(newValue) { + if (newValue) { + this.bindOutsideClickListener(); + } else { + this.unbindOutsideClickListener(); + } + } + }, selfClick: false, target: null, eventTarget: null,