ChoiceInput<T>
Input control base. Could be used for editing Property values as well. The root is a div that consists of captionLabel and input.
Extends
InputBase<T>
Type parameters
| Type parameter |
|---|
T |
Constructors
new ChoiceInput()
new ChoiceInput<
T>(dart,onChanged):ChoiceInput<T>
Parameters
| Parameter | Type | Default value |
|---|---|---|
dart | any | undefined |
onChanged | any | null |
Returns
ChoiceInput<T>
Overrides
Source
Properties
| Property | Type | Overrides |
|---|---|---|
dart | any | InputBase.dart |
Accessors
caption
getcaption():string
setcaption(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
captionLabel
getcaptionLabel():HTMLElement
Returns
HTMLElement
Source
classList
getclassList():DOMTokenList
Returns
DOMTokenList
Source
dataType
getdataType():string
Data type this input can edit. See Type.
Returns
string
Source
enabled
getenabled():boolean
Whether the input is enabled
setenabled(v):void
Parameters
| Parameter | Type |
|---|---|
v | boolean |
Returns
boolean
Source
format
getformat():string
Value format.
setformat(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
input
getinput():HTMLElement
Returns the actual input
Returns
HTMLElement
Source
inputType
getinputType():string
Input type identifier (such as "Slider" for the slider input). See InputType.
Returns
string
Source
items
getitems():T[]
setitems(s):void
Parameters
| Parameter | Type |
|---|---|
s | T[] |
Returns
T[]
Source
notify
getnotify():boolean
Whether events are thrown on value set
setnotify(v):void
Parameters
| Parameter | Type |
|---|---|
v | boolean |
Returns
boolean
Source
nullable
getnullable():boolean
Whether empty values are allowed
setnullable(v):void
Parameters
| Parameter | Type |
|---|---|
v | boolean |
Returns
boolean
Source
onChanged
getonChanged():Observable<T>
Occurs when [value] is changed, either by user or programmatically.
Returns
Observable<T>
Source
onInput
getonInput():Observable<Event>
Occurs when [value] is changed by user.
Returns
Observable<Event>
Source
property
getproperty():any
Property if associated with
setproperty(p):void
Parameters
| Parameter | Type |
|---|---|
p | Property |
Returns
any
Source
readOnly
getreadOnly():boolean
Whether the input is readonly
setreadOnly(v):void
Parameters
| Parameter | Type |
|---|---|
v | boolean |
Returns
boolean
Source
root
getroot():HTMLElement
Visual root (typically a div element that contains caption and input)
Returns
HTMLElement
Source
stringValue
getstringValue():string
String representation of the value
setstringValue(s):void
Parameters
| Parameter | Type |
|---|---|
s | string |
Returns
string
Source
value
getvalue():T
Input value
setvalue(x):void
Parameters
| Parameter | Type |
|---|---|
x | T |
Returns
T
Source
Methods
addCaption()
addCaption(
caption):InputBase<T>
Adds the specified caption
Parameters
| Parameter | Type |
|---|---|
caption | string |
Returns
InputBase<T>
Inherited from
Source
addOptions()
addOptions(
options):InputBase<T>
Adds the specified options
Parameters
| Parameter | Type |
|---|---|
options | HTMLElement |
Returns
InputBase<T>
Inherited from
Source
addPatternMenu()
addPatternMenu(
pattern):void
Adds a usage example to the input's hamburger menu
Parameters
| Parameter | Type |
|---|---|
pattern | any |
Returns
void
Inherited from
Source
addPostfix()
addPostfix(
postfix):InputBase<T>
Adds the specified postfix
Parameters
| Parameter | Type |
|---|---|
postfix | string |
Returns
InputBase<T>
Inherited from
Source
addValidator()
addValidator(
validator):void
Adds a validator that accepts a string representation of the edited value and returns null if valid, or error message if invalid
Parameters
| Parameter | Type |
|---|---|
validator | (value) => null | string |
Returns
void
Inherited from
Source
fireChanged()
fireChanged():
any
Fires the 'changed' event (value has changed). See also fireInput
Returns
any
Inherited from
Source
fireInput()
fireInput():
any
Fires the 'input' event (user input). See also fireChanged
Returns
any
Inherited from
Source
init()
init():
any
Returns
any
Inherited from
Source
load()
load(
s):any
Loads the value. Used in dialog history. See also load
Parameters
| Parameter | Type |
|---|---|
s | any |
Returns
any
Inherited from
Source
save()
save():
any
Saves the value. Used in dialog history. See also load
Returns
any
Inherited from
Source
setTooltip()
setTooltip(
msg,tooltipCheck):InputBase<T>
Sets the tooltip
Parameters
| Parameter | Type | Default value |
|---|---|---|
msg | string | undefined |
tooltipCheck | null | () => boolean | null |
Returns
InputBase<T>
Inherited from
Source
validate()
validate():
boolean
Performs immediate validation of the input and returns the result.
Returns
boolean
True if the input is valid; otherwise, false.
Inherited from
Source
forColumn()
staticforColumn<T>(column):InputBase<null|T>
Creates input for the specified column
Type parameters
| Type parameter | Value |
|---|---|
T | any |
Parameters
| Parameter | Type |
|---|---|
column | Column<T, T> |
Returns
InputBase<null | T>
Inherited from
Source
forInputType()
staticforInputType(inputType):InputBase<any>
Creates input for the specified input type
Parameters
| Parameter | Type |
|---|---|
inputType | string | InputType |
Returns
InputBase<any>
Inherited from
Source
forProperty()
staticforProperty(property,source):InputBase<any>
Creates input for the specified property, and optionally binds it to the specified object
Parameters
| Parameter | Type | Default value |
|---|---|---|
property | Property | undefined |
source | any | null |
Returns
InputBase<any>