Skip to content

Commit

Permalink
Merge pull request #2743 from tugcekucukoglu/confirm-dialog
Browse files Browse the repository at this point in the history
Fixed #2675 - ConfirmDialog: closeOnEscape support
  • Loading branch information
tugcekucukoglu authored Jul 1, 2022
2 parents a3be7c4 + 6e7972a commit 17c8d0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/confirmdialog/ConfirmDialog.vue
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -110,6 +110,9 @@ export default {
},
autoFocusReject() {
return this.confirmation.defaultFocus === 'reject' ? true : false;
},
closeOnEscape() {
return this.confirmation ? this.confirmation.closeOnEscape : true;
}
},
components: {
Expand Down

0 comments on commit 17c8d0b

Please sign in to comment.