Fixed #6456
parent
c0ed5f22bc
commit
afee6a32c5
|
@ -5,6 +5,7 @@
|
||||||
* @module confirmationoptions
|
* @module confirmationoptions
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
import type { HintedString } from '@primevue/core';
|
||||||
import type { ButtonProps } from 'primevue/button';
|
import type { ButtonProps } from 'primevue/button';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,6 +42,17 @@ export interface ConfirmationOptions {
|
||||||
* @defaultValue false
|
* @defaultValue false
|
||||||
*/
|
*/
|
||||||
blockScroll?: boolean | undefined;
|
blockScroll?: boolean | undefined;
|
||||||
|
/**
|
||||||
|
* A valid query selector or an HTMLElement to specify where the confirm dialog gets attached.
|
||||||
|
* Special keywords are 'body' for document body and 'self' for the element itself.
|
||||||
|
* @defaultValue body
|
||||||
|
*/
|
||||||
|
appendTo?: HintedString<'body' | 'self'> | undefined | HTMLElement;
|
||||||
|
/**
|
||||||
|
* Defines if background should be blocked when confirm dialog is displayed.
|
||||||
|
* @defaultValue false
|
||||||
|
*/
|
||||||
|
modal?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Callback to execute when action is confirmed.
|
* Callback to execute when action is confirmed.
|
||||||
* @todo Next release should be able to change
|
* @todo Next release should be able to change
|
||||||
|
|
|
@ -3,9 +3,10 @@
|
||||||
v-model:visible="visible"
|
v-model:visible="visible"
|
||||||
role="alertdialog"
|
role="alertdialog"
|
||||||
:class="cx('root')"
|
:class="cx('root')"
|
||||||
:modal="true"
|
:modal="modal"
|
||||||
:header="header"
|
:header="header"
|
||||||
:blockScroll="blockScroll"
|
:blockScroll="blockScroll"
|
||||||
|
:appendTo="appendTo"
|
||||||
:position="position"
|
:position="position"
|
||||||
:breakpoints="breakpoints"
|
:breakpoints="breakpoints"
|
||||||
:closeOnEscape="closeOnEscape"
|
:closeOnEscape="closeOnEscape"
|
||||||
|
@ -125,6 +126,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
appendTo() {
|
||||||
|
return this.confirmation ? this.confirmation.appendTo : 'body';
|
||||||
|
},
|
||||||
|
target() {
|
||||||
|
return this.confirmation ? this.confirmation.target : null;
|
||||||
|
},
|
||||||
|
modal() {
|
||||||
|
return this.confirmation ? (this.confirmation.modal == null ? true : this.confirmation.modal) : true;
|
||||||
|
},
|
||||||
header() {
|
header() {
|
||||||
return this.confirmation ? this.confirmation.header : null;
|
return this.confirmation ? this.confirmation.header : null;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue