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,20 +53,22 @@ export default {
default: null default: null
} }
}, },
emits: ['show', 'hide'],
data() { data() {
return { return {
visible: false visible: false
} }
}, },
watch: { watch: {
dismissable(newValue) { dismissable: {
immediate: true,
handler(newValue) {
if (newValue) { if (newValue) {
this.bindOutsideClickListener(); this.bindOutsideClickListener();
} else { } else {
this.unbindOutsideClickListener(); this.unbindOutsideClickListener();
} }
} }
}
}, },
selfClick: false, selfClick: false,
target: null, target: null,