Skip to main content

abstract JsInputBase<T>

Base class for JS value editors

Extends

Type parameters

Type parameterValue
Tany

Constructors

new JsInputBase()

new JsInputBase<T>(): JsInputBase<T>

Returns

JsInputBase<T>

Overrides

InputBase . constructor

Source

src/widgets.ts:1276

Properties

PropertyTypeInherited from
dartanyInputBase.dart

Accessors

caption

get caption(): string

set caption(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/widgets.ts:1104


captionLabel

get captionLabel(): HTMLElement

Returns

HTMLElement

Source

src/widgets.ts:1117


classList

get classList(): DOMTokenList

Returns

DOMTokenList

Source

src/widgets.ts:1209


dataType

get abstract dataType(): string

Data type this input can edit. See Type.

Returns

string

Source

src/widgets.ts:1258


enabled

get enabled(): boolean

Whether the input is enabled

set enabled(v): void

Parameters

ParameterType
vboolean

Returns

boolean

Source

src/widgets.ts:1143


format

get format(): string

Value format.

set format(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/widgets.ts:1114


input

get input(): HTMLElement

Returns the actual input

Returns

HTMLElement

Source

src/widgets.ts:1268


inputType

get abstract inputType(): string

Input type identifier (such as "Slider" for the slider input). See InputType.

Returns

string

Source

src/widgets.ts:1257


notify

get notify(): boolean

Whether events are thrown on value set

set notify(v): void

Parameters

ParameterType
vboolean

Returns

boolean

Source

src/widgets.ts:1127


nullable

get nullable(): boolean

Whether empty values are allowed

set nullable(v): void

Parameters

ParameterType
vboolean

Returns

boolean

Source

src/widgets.ts:1123


onChanged

get onChanged(): Observable<T>

Occurs when [value] is changed, either by user or programmatically.

Returns

Observable<T>

Source

src/widgets.ts:1147


onInput

get onInput(): Observable<Event>

Occurs when [value] is changed by user.

Returns

Observable<Event>

Source

src/widgets.ts:1150


property

get property(): any

Property if associated with

set property(p): void

Parameters

ParameterType
pProperty

Returns

any

Source

src/widgets.ts:1110


readOnly

get readOnly(): boolean

Whether the input is readonly

set readOnly(v): void

Parameters

ParameterType
vboolean

Returns

boolean

Source

src/widgets.ts:1139


root

get root(): HTMLElement

Visual root (typically a div element that contains caption and input)

Returns

HTMLElement

Source

src/widgets.ts:1102


stringValue

get stringValue(): string

String representation of the value

set stringValue(value): void

Parameters

ParameterType
valuestring

Returns

string

Source

src/widgets.ts:1273


value

get value(): T

Input value

set value(value): void

Parameters

ParameterType
valueT

Returns

T

Source

src/widgets.ts:1270

Methods

addCaption()

addCaption(caption): InputBase<T>

Adds the specified caption

Parameters

ParameterType
captionstring

Returns

InputBase<T>

Inherited from

InputBase . addCaption

Source

src/widgets.ts:1175


addOptions()

addOptions(options): InputBase<T>

Adds the specified options

Parameters

ParameterType
optionsHTMLElement

Returns

InputBase<T>

Inherited from

InputBase . addOptions

Source

src/widgets.ts:1187


addPatternMenu()

addPatternMenu(pattern): void

Adds a usage example to the input's hamburger menu

Parameters

ParameterType
patternany

Returns

void

Inherited from

InputBase . addPatternMenu

Source

src/widgets.ts:1193


addPostfix()

addPostfix(postfix): InputBase<T>

Adds the specified postfix

Parameters

ParameterType
postfixstring

Returns

InputBase<T>

Inherited from

InputBase . addPostfix

Source

src/widgets.ts:1181


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

ParameterType
validator(value) => null | string

Returns

void

Inherited from

InputBase . addValidator

Source

src/widgets.ts:1199


fireChanged()

fireChanged(): any

Fires the 'changed' event (value has changed). See also fireInput

Returns

any

Inherited from

InputBase . fireChanged

Source

src/widgets.ts:1165


fireInput()

fireInput(): any

Fires the 'input' event (user input). See also fireChanged

Returns

any

Inherited from

InputBase . fireInput

Source

src/widgets.ts:1170


getInput()

abstract getInput(): HTMLElement

Returns

HTMLElement

Source

src/widgets.ts:1260


getStringValue()

abstract getStringValue(): string

Returns

string

Source

src/widgets.ts:1265


getValue()

abstract getValue(): T

Returns

T

Source

src/widgets.ts:1262


init()

init(): any

Returns

any

Inherited from

InputBase . init

Source

src/widgets.ts:1160


load()

load(s): any

Loads the value. Used in dialog history. See also load

Parameters

ParameterType
sany

Returns

any

Inherited from

InputBase . load

Source

src/widgets.ts:1158


save()

save(): any

Saves the value. Used in dialog history. See also load

Returns

any

Inherited from

InputBase . save

Source

src/widgets.ts:1153


setStringValue()

abstract setStringValue(value): void

Parameters

ParameterType
valuestring

Returns

void

Source

src/widgets.ts:1266


setTooltip()

setTooltip(msg, tooltipCheck): InputBase<T>

Sets the tooltip

Parameters

ParameterTypeDefault value
msgstringundefined
tooltipChecknull | () => booleannull

Returns

InputBase<T>

Inherited from

InputBase . setTooltip

Source

src/widgets.ts:1204


setValue()

abstract setValue(value): void

Parameters

ParameterType
valueT

Returns

void

Source

src/widgets.ts:1263


forColumn()

static forColumn<T>(column): InputBase<null | T>

Creates input for the specified column

Type parameters

Type parameterValue
Tany

Parameters

ParameterType
columnColumn<T>

Returns

InputBase<null | T>

Inherited from

InputBase . forColumn

Source

src/widgets.ts:1089


forInputType()

static forInputType(inputType): InputBase<any>

Creates input for the specified input type

Parameters

ParameterType
inputTypestring | InputType

Returns

InputBase<any>

Inherited from

InputBase . forInputType

Source

src/widgets.ts:1084


forProperty()

static forProperty(property, source): InputBase<any>

Creates input for the specified property, and optionally binds it to the specified object

Parameters

ParameterTypeDefault value
propertyPropertyundefined
sourceanynull

Returns

InputBase<any>

Inherited from

InputBase . forProperty

Source

src/widgets.ts:1079