Merge pull request #2742 from tugcekucukoglu/refactor-overlaypanel

Refactor #2540
pull/2743/head
Tuğçe Küçükoğlu 2022-07-01 10:06:29 +03:00 committed by GitHub
commit a3be7c4a48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 6 deletions

View File

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