Last date modified: 2025-Apr-29
Interface: ConfirmModalModel
ModalApi.ConfirmModalModel
Description
Modal used to display a confirmation message to the user
Properties
- acceptAction
- acceptIsDestructive
- acceptText
- cancelAction
- cancelText
- closeOnAcceptActionFailure
- disableAcceptButtonAfterClick
- focusEls
- message
- title
Properties
acceptAction
OptionalacceptAction: () =>Promise<boolean>
Type declaration
- ():
Promise<boolean>
Specifies further action after the user accepts
Returns
Promise<boolean>
acceptIsDestructive
OptionalacceptIsDestructive:boolean
If true, the accept button will be styled to indicate a destructive action. If false, it will be styled as a primary button.
acceptText
OptionalacceptText:string
Text to display for the accept button. Defaults to "Accept".
cancelAction
OptionalcancelAction: () =>boolean
Type declaration
- ():
boolean
Specifies further action after the user cancels
Returns
boolean
cancelText
OptionalcancelText:string
Text to display for the cancel button. Defaults to "Cancel".
closeOnAcceptActionFailure
OptionalcloseOnAcceptActionFailure:boolean
If true, the modal will close when the accept function errors
disableAcceptButtonAfterClick
OptionaldisableAcceptButtonAfterClick:boolean
If true, the accept button will be disabled after it is clicked
focusEls
OptionalfocusEls:Object
Specifies an element to focus on
Type declaration
| Name | Type | Description |
|---|---|---|
accept?
|
HTMLElement
|
HTMLElement to focus on when the accept action is taken |
cancel?
|
HTMLElement
|
HTMLElement to focus on when the cancel action is taken |
error?
|
HTMLElement
|
HTMLElement to focus on when an error occurs when the accept action is taken |
message
- message:
string
Message describing something that the user should confirm they want to act on.
title
- title:
string
Text to display in the modal header.