@serenity-is/corelib / DialogOptions
Interface: DialogOptions
Options that apply to all dialog types
Hierarchy
DialogOptions
Table of contents
Properties
- autoDispose
- autoOpen
- backdrop
- buttons
- centered
- closeButton
- closeOnEscape
- dialogClass
- element
- fade
- fullScreen
- modal
- onClose
- onOpen
- preferBSModal
- preferPanel
- providerOptions
- scrollable
- size
- title
- width
Properties
autoDispose
• Optional autoDispose: boolean
Auto dispose dialog on close, default is true
Defined in
autoOpen
• Optional autoOpen: boolean
True to auto open dialog
Defined in
backdrop
• Optional backdrop: boolean | "static"
Backdrop type, static to make it modal, e.g. can't be closed by clicking outside
Defined in
buttons
• Optional buttons: DialogButton[]
List of buttons to show on the dialog
Defined in
centered
• Optional centered: boolean
Vertically center modal
Defined in
closeButton
• Optional closeButton: boolean
Show close button, default is true
Defined in
closeOnEscape
• Optional closeOnEscape: boolean
Close dialog on escape key. Default is true for message dialogs.
Defined in
dialogClass
• Optional dialogClass: string
CSS class to use for all dialog types. Is added to the top ui-dialog, panel or modal element
Defined in
element
• Optional element: HTMLElement | ArrayLike<HTMLElement> | (element: HTMLElement) => void
Dialog content/body element, or callback that will populate the content element
Defined in
fade
• Optional fade: boolean
Enable / disable animation. Default is false for message dialogs, true for other dialogs
Defined in
fullScreen
• Optional fullScreen: boolean | "sm-down" | "md-down" | "lg-down" | "xl-down" | "xxl-down"
Sets one of modal-fullscreen{-...-down} classes. Only used for bootstrap modals
Defined in
modal
• Optional modal: boolean
Modal option for jQuery UI dialog compatibility only. Not to be confused with Bootstrap modal.
Defined in
onClose
• Optional onClose: (result: string, e?: Event) => void
Event handler that is called when dialog is closed
Type declaration
▸ (result, e?): void
Parameters
| Name | Type |
|---|---|
result |
string |
e? |
Event |
Returns
void
Defined in
onOpen
• Optional onOpen: (e?: Event) => void
Event handler that is called when dialog is opened
Type declaration
▸ (e?): void
Parameters
| Name | Type |
|---|---|
e? |
Event |
Returns
void
Defined in
preferBSModal
• Optional preferBSModal: boolean
Prefer Bootstrap modals to jQuery UI dialogs when both are available
Defined in
preferPanel
• Optional preferPanel: boolean
Prefer Panel even when Modal / jQuery UI is available
Defined in
providerOptions
• Optional providerOptions: (type: DialogType, opt: DialogOptions) => any
Callback to get options specific to the dialog provider type
Type declaration
▸ (type, opt): any
Parameters
| Name | Type |
|---|---|
type |
DialogType |
opt |
DialogOptions |
Returns
any
Defined in
scrollable
• Optional scrollable: boolean
Scrollable, sets content of the modal to scrollable, only for Bootstrap
Defined in
size
• Optional size: "sm" | "md" | "lg" | "xl"
Size. Default is null for (500px) message dialogs, lg for normal dialogs
Defined in
title
• Optional title: string
Dialog title
Defined in
width
• Optional width: number
Only used for jQuery UI dialogs for backwards compatibility