Merge pull request #2743 from tugcekucukoglu/confirm-dialog

Fixed #2675 - ConfirmDialog: closeOnEscape support
pull/2746/head
Tuğçe Küçükoğlu 2022-07-01 10:17:02 +03:00 committed by GitHub
commit 17c8d0be35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,6 @@
<template>
<CDialog v-model:visible="visible" :modal="true" :header="header" :blockScroll="blockScroll" :position="position" class="p-confirm-dialog"
:breakpoints="breakpoints">
:breakpoints="breakpoints" :closeOnEscape="closeOnEscape">
<i :class="iconClass" />
<span class="p-confirm-dialog-message">{{message}}</span>
<template #footer>
@ -110,6 +110,9 @@ export default {
},
autoFocusReject() {
return this.confirmation.defaultFocus === 'reject' ? true : false;
},
closeOnEscape() {
return this.confirmation ? this.confirmation.closeOnEscape : true;
}
},
components: {