Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IOptions<T>

An options object for initializing a widget. The options used to create a dialog.

Type parameters

  • T

Hierarchy

  • IOptions

Index

Properties

body

body: Body<T>

The main body element for the dialog or a message to display. Defaults to an empty string.

Notes

If a widget is given as the body, it will be disposed after the dialog is resolved. If the widget has a getValue() method, the method will be called prior to disposal and the value will be provided as part of the dialog result. A string argument will be used as raw textContent. All input and select nodes will be wrapped and styled.

buttons

buttons: ReadonlyArray<IButton>

The buttons to display. Defaults to cancel and accept buttons.

defaultButton

defaultButton: number

The index of the default button. Defaults to the last button.

focusNodeSelector

focusNodeSelector: string

A selector for the primary element that should take focus in the dialog. Defaults to an empty string, causing the defaultButton to take focus.

host

host: HTMLElement

The host element for the dialog. Defaults to document.body.

Optional node

node: HTMLElement

The optional node to use for the widget.

If a node is provided, the widget will assume full ownership and control of the node, as if it had created the node itself.

The default is a new <div>.

renderer

renderer: IRenderer

An optional renderer for dialog items. Defaults to a shared default renderer.

title

title: Header

The top level text for the dialog. Defaults to an empty string.

Generated using TypeDoc