@serenity-is/corelib / MessageDialogOptions
Interface: MessageDialogOptions
Options that apply to all message dialog types
Hierarchy
-
↳
MessageDialogOptions
Table of contents
Properties
- autoDispose
- autoOpen
- backdrop
- buttons
- centered
- closeButton
- closeOnEscape
- dialogClass
- element
- fade
- fullScreen
- htmlEncode
- modal
- onClose
- onOpen
- preWrap
- preferBSModal
- preferPanel
- providerOptions
- scrollable
- size
- title
- width
Properties
autoDispose
• Optional
autoDispose: boolean
Auto dispose dialog on close, default is true
Inherited from
Defined in
autoOpen
• Optional
autoOpen: boolean
True to auto open dialog
Inherited from
Defined in
backdrop
• Optional
backdrop: boolean
| "static"
Backdrop type, static to make it modal, e.g. can't be closed by clicking outside
Inherited from
Defined in
buttons
• Optional
buttons: DialogButton
[]
List of buttons to show on the dialog
Inherited from
Defined in
centered
• Optional
centered: boolean
Vertically center modal
Inherited from
Defined in
closeButton
• Optional
closeButton: boolean
Show close button, default is true
Inherited from
Defined in
closeOnEscape
• Optional
closeOnEscape: boolean
Close dialog on escape key. Default is true for message dialogs.
Inherited from
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
Inherited from
Defined in
element
• Optional
element: HTMLElement
| ArrayLike
<HTMLElement
> | (element
: HTMLElement
) => void
Dialog content/body element, or callback that will populate the content element
Inherited from
Defined in
fade
• Optional
fade: boolean
Enable / disable animation. Default is false for message dialogs, true for other dialogs
Inherited from
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
Inherited from
Defined in
htmlEncode
• Optional
htmlEncode: boolean
HTML encode the message, default is true
Defined in
modal
• Optional
modal: boolean
Modal option for jQuery UI dialog compatibility only. Not to be confused with Bootstrap modal.
Inherited from
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
Inherited from
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
Inherited from
Defined in
preWrap
• Optional
preWrap: boolean
Wrap the message in a <pre>
element, so that line endings are preserved, default is true
Defined in
preferBSModal
• Optional
preferBSModal: boolean
Prefer Bootstrap modals to jQuery UI dialogs when both are available
Inherited from
Defined in
preferPanel
• Optional
preferPanel: boolean
Prefer Panel even when Modal / jQuery UI is available
Inherited from
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
Inherited from
Defined in
scrollable
• Optional
scrollable: boolean
Scrollable, sets content of the modal to scrollable, only for Bootstrap
Inherited from
Defined in
size
• Optional
size: "sm"
| "md"
| "lg"
| "xl"
Size. Default is null for (500px) message dialogs, lg for normal dialogs
Inherited from
Defined in
title
• Optional
title: string
Dialog title
Inherited from
Defined in
width
• Optional
width: number
Only used for jQuery UI dialogs for backwards compatibility