Skip to main content

Class: JsInputBase<T>

dg.JsInputBase

Base class for JS value editors

Type parameters

NameType
Tany

Hierarchy

Constructors

constructor

new JsInputBase<T>()

Type parameters

NameType
Tany

Overrides

InputBase.constructor

Defined in

src/widgets.ts:1234

Properties

dart

dart: any

Inherited from

InputBase.dart

Defined in

src/widgets.ts:1024

Accessors

caption

get caption(): string

Returns

string

Inherited from

InputBase.caption

Defined in

src/widgets.ts:1058

set caption(s): void

Parameters

NameType
sstring

Returns

void

Inherited from

InputBase.caption

Defined in

src/widgets.ts:1061


captionLabel

get captionLabel(): HTMLElement

Returns

HTMLElement

Inherited from

InputBase.captionLabel

Defined in

src/widgets.ts:1071


classList

get classList(): DOMTokenList

Returns

DOMTokenList

Inherited from

InputBase.classList

Defined in

src/widgets.ts:1167


dataType

Abstract get dataType(): string

Data type this input can edit. See Type.

Returns

string

Overrides

InputBase.dataType

Defined in

src/widgets.ts:1216


enabled

get enabled(): boolean

Whether the input is enabled

Returns

boolean

Inherited from

InputBase.enabled

Defined in

src/widgets.ts:1097

set enabled(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.enabled

Defined in

src/widgets.ts:1098


format

get format(): string

Value format.

Returns

string

Inherited from

InputBase.format

Defined in

src/widgets.ts:1068

set format(s): void

Parameters

NameType
sstring

Returns

void

Inherited from

InputBase.format

Defined in

src/widgets.ts:1069


input

get input(): HTMLElement

Returns the actual input

Returns

HTMLElement

Overrides

InputBase.input

Defined in

src/widgets.ts:1226


inputType

Abstract get inputType(): string

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

Returns

string

Overrides

InputBase.inputType

Defined in

src/widgets.ts:1215


notify

get notify(): boolean

Whether events are thrown on value set

Returns

boolean

Inherited from

InputBase.notify

Defined in

src/widgets.ts:1081

set notify(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.notify

Defined in

src/widgets.ts:1082


nullable

get nullable(): boolean

Whether empty values are allowed

Returns

boolean

Inherited from

InputBase.nullable

Defined in

src/widgets.ts:1077

set nullable(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.nullable

Defined in

src/widgets.ts:1078


property

get property(): any

Property if associated with

Returns

any

Inherited from

InputBase.property

Defined in

src/widgets.ts:1064

set property(p): void

Parameters

NameType
pProperty

Returns

void

Inherited from

InputBase.property

Defined in

src/widgets.ts:1065


readOnly

get readOnly(): boolean

Whether the input is readonly

Returns

boolean

Inherited from

InputBase.readOnly

Defined in

src/widgets.ts:1093

set readOnly(v): void

Parameters

NameType
vboolean

Returns

void

Inherited from

InputBase.readOnly

Defined in

src/widgets.ts:1094


root

get root(): HTMLElement

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

Returns

HTMLElement

Inherited from

InputBase.root

Defined in

src/widgets.ts:1056


stringValue

get stringValue(): string

String representation of the value

Returns

string

Overrides

InputBase.stringValue

Defined in

src/widgets.ts:1231

set stringValue(value): void

Parameters

NameType
valuestring

Returns

void

Overrides

InputBase.stringValue

Defined in

src/widgets.ts:1232


value

get value(): T

Input value

Returns

T

Overrides

InputBase.value

Defined in

src/widgets.ts:1228

set value(value): void

Parameters

NameType
valueT

Returns

void

Overrides

InputBase.value

Defined in

src/widgets.ts:1229

Methods

addCaption

addCaption(caption): InputBase<T>

Adds the specified caption

Parameters

NameType
captionstring

Returns

InputBase<T>

Inherited from

InputBase.addCaption

Defined in

src/widgets.ts:1133


addOptions

addOptions(options): InputBase<T>

Adds the specified options

Parameters

NameType
optionsHTMLElement

Returns

InputBase<T>

Inherited from

InputBase.addOptions

Defined in

src/widgets.ts:1145


addPatternMenu

addPatternMenu(pattern): void

Adds a usage example to the input's hamburger menu

Parameters

NameType
patternany

Returns

void

Inherited from

InputBase.addPatternMenu

Defined in

src/widgets.ts:1151


addPostfix

addPostfix(postfix): InputBase<T>

Adds the specified postfix

Parameters

NameType
postfixstring

Returns

InputBase<T>

Inherited from

InputBase.addPostfix

Defined in

src/widgets.ts:1139


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

NameType
validator(value: string) => null | string

Returns

void

Inherited from

InputBase.addValidator

Defined in

src/widgets.ts:1157


fireChanged

fireChanged(): any

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

Returns

any

Inherited from

InputBase.fireChanged

Defined in

src/widgets.ts:1123


fireInput

fireInput(): any

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

Returns

any

Inherited from

InputBase.fireInput

Defined in

src/widgets.ts:1128


getInput

Abstract getInput(): HTMLElement

Returns

HTMLElement

Defined in

src/widgets.ts:1218


getStringValue

Abstract getStringValue(): string

Returns

string

Defined in

src/widgets.ts:1223


getValue

Abstract getValue(): T

Returns

T

Defined in

src/widgets.ts:1220


init

init(): any

Returns

any

Inherited from

InputBase.init

Defined in

src/widgets.ts:1118


load

load(s): any

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

Parameters

NameType
sany

Returns

any

Inherited from

InputBase.load

Defined in

src/widgets.ts:1116


onChanged

onChanged(callback): StreamSubscription

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

Parameters

NameType
callbackFunction

Returns

StreamSubscription

Inherited from

InputBase.onChanged

Defined in

src/widgets.ts:1101


onInput

onInput(callback): StreamSubscription

Occurs when [value] is changed by user.

Parameters

NameType
callbackFunction

Returns

StreamSubscription

Inherited from

InputBase.onInput

Defined in

src/widgets.ts:1106


save

save(): any

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

Returns

any

Inherited from

InputBase.save

Defined in

src/widgets.ts:1111


setStringValue

Abstract setStringValue(value): void

Parameters

NameType
valuestring

Returns

void

Defined in

src/widgets.ts:1224


setTooltip

setTooltip(msg, tooltipCheck?): InputBase<T>

Sets the tooltip

Parameters

NameTypeDefault value
msgstringundefined
tooltipChecknull | () => booleannull

Returns

InputBase<T>

Inherited from

InputBase.setTooltip

Defined in

src/widgets.ts:1162


setValue

Abstract setValue(value): void

Parameters

NameType
valueT

Returns

void

Defined in

src/widgets.ts:1221


forColumn

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

Creates input for the specified column

Type parameters

NameType
Tany

Parameters

NameType
columnColumn<T>

Returns

InputBase<null | T>

Inherited from

InputBase.forColumn

Defined in

src/widgets.ts:1043


forInputType

Static forInputType(inputType): InputBase<any>

Creates input for the specified input type

Parameters

NameType
inputTypestring | InputType

Returns

InputBase<any>

Inherited from

InputBase.forInputType

Defined in

src/widgets.ts:1038


forProperty

Static forProperty(property, source?): InputBase<any>

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

Parameters

NameTypeDefault value
propertyPropertyundefined
sourceanynull

Returns

InputBase<any>

Inherited from

InputBase.forProperty

Defined in

src/widgets.ts:1033