Skip to content

@serenity-is/corelib / ConfirmDialogOptions

Interface: ConfirmDialogOptions

Defined in: src/base/dialogs.tsx:1149

Additional options for confirmDialog.

Remarks

Extends MessageDialogOptions with callbacks for the secondary buttons.

Extends

Properties

autoDispose?

optional autoDispose: boolean

Defined in: src/base/dialogs.tsx:57

When true, Dialog.dispose is called automatically on close.

Default Value

true

Inherited from

MessageDialogOptions.autoDispose


autoOpen?

optional autoOpen: boolean

Defined in: src/base/dialogs.tsx:59

When true, the dialog opens immediately after construction.

Default Value

true

Inherited from

MessageDialogOptions.autoOpen


backdrop?

optional backdrop: boolean | "static"

Defined in: src/base/dialogs.tsx:61

Backdrop behavior for Bootstrap modals; "static" prevents closing on outside click.

Default Value

false

Inherited from

MessageDialogOptions.backdrop


buttons?

optional buttons: DialogButton[]

Defined in: src/base/dialogs.tsx:63

Buttons rendered in the dialog footer.

Inherited from

MessageDialogOptions.buttons


cancelButton?

optional cancelButton: boolean

Defined in: src/base/dialogs.tsx:1151

When true, an extra Cancel button (result "cancel") is rendered alongside Yes/No.


centered?

optional centered: boolean

Defined in: src/base/dialogs.tsx:69

Vertically centers a Bootstrap modal via modal-dialog-centered. When false, the modal is anchored at the --s-modal-top theme token, so it grows downwards instead of moving as its content changes; combine with scrollable to scroll its body once it reaches the bottom of the viewport.

Default Value

true

Inherited from

MessageDialogOptions.centered


closeButton?

optional closeButton: boolean

Defined in: src/base/dialogs.tsx:71

Whether to render the header close (× / btn-close) button.

Default Value

true

Inherited from

MessageDialogOptions.closeButton


closeOnEscape?

optional closeOnEscape: boolean

Defined in: src/base/dialogs.tsx:73

Whether pressing Escape closes the dialog. Message dialogs default to true.

Inherited from

MessageDialogOptions.closeOnEscape


dialogClass?

optional dialogClass: string

Defined in: src/base/dialogs.tsx:75

Extra CSS class(es) added to the root dialog element (.modal, .ui-dialog, or .s-Panel).

Inherited from

MessageDialogOptions.dialogClass


element?

optional element: HTMLElement | ArrayLike<HTMLElement> | (element) => void

Defined in: src/base/dialogs.tsx:77

Body element or a callback that populates the freshly created body element. Array-like values are treated as the content node.

Inherited from

MessageDialogOptions.element


fade?

optional fade: boolean

Defined in: src/base/dialogs.tsx:79

Enables fade animation for Bootstrap modals.

Default Value

false for message dialogs, true otherwise

Inherited from

MessageDialogOptions.fade


fullScreen?

optional fullScreen: boolean | "sm-down" | "md-down" | "lg-down" | "xl-down" | "xxl-down"

Defined in: src/base/dialogs.tsx:89

Applies a modal-fullscreen[-{breakpoint}-down] class. Only effective for Bootstrap modals.

Inherited from

MessageDialogOptions.fullScreen


height?

optional height: "auto" | "md" | "lg" | "full"

Defined in: src/base/dialogs.tsx:87

Fixed height of a Bootstrap modal: "md" and "lg" take the --s-modal-height-md and --s-modal-height-lg theme tokens, "full" the height of the viewport. A modal with a fixed height keeps its size and position while its content changes, and its body scrolls. The height is capped to the viewport, and a fullscreen modal keeps its full height. "auto", or leaving it unset, sizes the modal to its content. Only effective for Bootstrap modals.

Default Value

undefined (auto)

Inherited from

MessageDialogOptions.height


htmlEncode?

optional htmlEncode: boolean

Defined in: src/base/dialogs.tsx:1043

Whether to HTML-encode string messages.

Default Value

true

Deprecated

Prefer passing a RenderableContent node or pre-sanitized HTML. When false, the string is sanitized via sanitizeHtml.

Inherited from

MessageDialogOptions.htmlEncode


optional modal: boolean

Defined in: src/base/dialogs.tsx:91

jQuery UI modal flag. Retained for backward compatibility; does not affect Bootstrap modals.

Inherited from

MessageDialogOptions.modal


onCancel()?

optional onCancel: () => void

Defined in: src/base/dialogs.tsx:1153

Callback invoked when the Cancel button is clicked (only when cancelButton is true).

Returns

void


onClose()?

optional onClose: (result, e?) => void

Defined in: src/base/dialogs.tsx:95

Callback invoked after the dialog is closed, receiving the result code.

Parameters

result

string

e?

Event

Returns

void

Inherited from

MessageDialogOptions.onClose


onNo()?

optional onNo: () => void

Defined in: src/base/dialogs.tsx:1155

Callback invoked when the No button is clicked.

Returns

void


onOpen()?

optional onOpen: (e?) => void

Defined in: src/base/dialogs.tsx:93

Callback invoked after the dialog is opened.

Parameters

e?

Event

Returns

void

Inherited from

MessageDialogOptions.onOpen


preferBSModal?

optional preferBSModal: boolean

Defined in: src/base/dialogs.tsx:97

When both providers are available, prefer Bootstrap modal over jQuery UI dialog.

Default Value

true

Inherited from

MessageDialogOptions.preferBSModal


preferPanel?

optional preferPanel: boolean

Defined in: src/base/dialogs.tsx:99

Force inline panel mode even when modal / jQuery UI providers are available.

Inherited from

MessageDialogOptions.preferPanel


preWrap?

optional preWrap: boolean

Defined in: src/base/dialogs.tsx:1048

Whether to preserve line breaks via white-space: pre-wrap on the message container.

Default Value

true

Remarks

Only applied when the message is a string; element messages manage their own styling.

Inherited from

MessageDialogOptions.preWrap


providerOptions()?

optional providerOptions: (type, opt) => any

Defined in: src/base/dialogs.tsx:101

Returns provider-specific options merged into the underlying call (Bootstrap modal options or jQuery UI dialog options).

Parameters

type

DialogProviderType

Resolved provider type.

opt

DialogOptions

The resolved dialog options.

Returns

any

Provider-specific options object.

Inherited from

MessageDialogOptions.providerOptions


scrollable?

optional scrollable: boolean

Defined in: src/base/dialogs.tsx:103

Makes the Bootstrap modal body scrollable via modal-dialog-scrollable.

Inherited from

MessageDialogOptions.scrollable


size?

optional size: "md" | "lg" | "sm" | "xl"

Defined in: src/base/dialogs.tsx:105

Bootstrap modal size.

Default Value

"lg" for regular dialogs, "md" for message dialogs

Inherited from

MessageDialogOptions.size


title?

optional title: string

Defined in: src/base/dialogs.tsx:107

Title text shown in the dialog header.

Inherited from

MessageDialogOptions.title


width?

optional width: number

Defined in: src/base/dialogs.tsx:109

Initial width in pixels; only used by the jQuery UI dialog provider.

Inherited from

MessageDialogOptions.width