Dialog<Inputs>
A non-modal dialog. Sample: https://public.datagrok.ai/js/samples/ui/dialogs
Example
ui.dialog('Windows')
.add(ui.)
.add(ui.span(['People of Earth, your attention, please… ']))
.onOK(() => { grok.shell.info('OK!'); })
.show();
Extends
Extended by
Type parameters
| Type parameter | Value |
|---|---|
Inputs extends Record<string, InputBase<any>> | object |
Constructors
new Dialog()
new Dialog<
Inputs>(dart):Dialog<Inputs>
Parameters
| Parameter | Type |
|---|---|
dart | any |
Returns
Dialog<Inputs>
Overrides
Source
Properties
| Property | Modifier | Type | Default value | Description | Inherited from |
|---|---|---|---|---|---|
_functions | protected | Func[] | [] | - | DartWidget._functions |
_properties | protected | Property[] | [] | - | DartWidget._properties |
_root | protected | HTMLElement | undefined | - | DartWidget._root |
dart | public | any | undefined | - | DartWidget.dart |
factory | public | null | Func | null | Constructor function. No parameters, returns [Widget]. | DartWidget.factory |
isDetached | public | boolean | false | - | DartWidget.isDetached |
props | public | any | undefined | - | DartWidget.props |
subs | public | Subscription[] | undefined | - | DartWidget.subs |
temp | public | any | undefined | Contains auxiliary information | DartWidget.temp |
Accessors
children
getchildren():Widget<any>[]
Parent widget up the DOM tree, or null.
Returns
Widget<any>[]
Source
helpUrl
gethelpUrl():string
When provided, adds a "?" icon to the dialog header on the right.
sethelpUrl(url):void
Parameters
| Parameter | Type |
|---|---|
url | string |
Returns
string
Source
inputs
getinputs():InputBase<any>[]
Returns a list of the dialog's inputs.
Returns
InputBase<any>[]
Source
namedInputs
getnamedInputs():Inputs
gets typed inputs with captions as keys.
Returns
Inputs
Source
onClose
getonClose():Observable<any>
Returns
Observable<any>
Source
parent
getparent():null|Widget<any>
Parent widget up the DOM tree, or null.
Returns
null | Widget<any>
Source
root
getroot():HTMLElement
Widget's visual root.
Returns
HTMLElement
Source
title
gettitle():string
Returns the title of a dialog.
settitle(t):void
Parameters
| Parameter | Type |
|---|---|
t | string |
Returns
string
Source
type
gettype():string
Returns
string
Source
Methods
add()
add(
content):Dialog<Inputs>
Adds content to the dialog. using addInput() for inputs is preferred, as it provides better type safety.
Parameters
| Parameter | Type | Description |
|---|---|---|
content | HTMLElement | Widget<any> | InputBase<any> |
Returns
Dialog<Inputs>