pull/2742/head
Tuğçe Küçükoğlu 2022-07-01 10:06:14 +03:00
parent f37074fbb3
commit 11acabdcc5
1 changed files with 9 additions and 6 deletions

View File

@ -22,6 +22,7 @@ import Portal from 'primevue/portal';
export default { export default {
name: 'OverlayPanel', name: 'OverlayPanel',
inheritAttrs: false, inheritAttrs: false,
emits: ['show', 'hide'],
props: { props: {
dismissable: { dismissable: {
type: Boolean, type: Boolean,
@ -52,18 +53,20 @@ export default {
default: null default: null
} }
}, },
emits: ['show', 'hide'],
data() { data() {
return { return {
visible: false visible: false
} }
}, },
watch: { watch: {
dismissable(newValue) { dismissable: {
if (newValue) { immediate: true,
this.bindOutsideClickListener(); handler(newValue) {
} else { if (newValue) {
this.unbindOutsideClickListener(); this.bindOutsideClickListener();
} else {
this.unbindOutsideClickListener();
}
} }
} }
}, },