Skip to main content

TagsInput

Input control base. Could be used for editing Property values as well. The root is a div that consists of captionLabel and input.

Extends

Constructors

new TagsInput()

new TagsInput(name, config?): TagsInput

Parameters

ParameterType
namestring
config?TagsInputConfig

Returns

TagsInput

Overrides

InputBase . constructor

Source

src/widgets.ts:2153

Properties

PropertyModifierTypeDefault valueInherited from
_addTagIconprivateHTMLElementundefined-
_onTagAddedprivateSubject<string>...-
_onTagRemovedprivateSubject<string>...-
_tagsprivatestring[]undefined-
_tagsDivprivateHTMLDivElementundefined-
dartpublicanyundefinedInputBase.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 dataType(): string

Data type this input can edit. See Type.

Returns

string

Source

src/widgets.ts:1099


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:1120


inputType

get inputType(): string

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

Returns

string

Source

src/widgets.ts:1094


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


onTagAdded

get onTagAdded(): Observable<string>

Returns

Observable<string>

Source

src/widgets.ts:2287


onTagRemoved

get onTagRemoved(): Observable<string>

Returns

Observable<string>

Source

src/widgets.ts:2291


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(s): void

Parameters

ParameterType
sstring

Returns

string

Source

src/widgets.ts:1135


value

get value(): T

Input value

set value(x): void

Parameters

ParameterType
xT

Returns

T

Source

src/widgets.ts:1131

Methods

_createRoot()

private _createRoot(): void

Returns

void

Source

src/widgets.ts:2216


_createTag()

private _createTag(tag): HTMLElement

Parameters

ParameterType
tagstring

Returns

HTMLElement

Source

src/widgets.ts:2168


_createTagEditInput()

private _createTagEditInput(currentTag): HTMLInputElement

Parameters

ParameterType
currentTagHTMLElement

Returns

HTMLInputElement

Source

src/widgets.ts:2185


_initEventListeners()

private _initEventListeners(): void

Returns

void

Source

src/widgets.ts:2225


_isProper()

private _isProper(tag): boolean

Parameters

ParameterType
tagstring

Returns

boolean

Source

src/widgets.ts:2249


_renameTag()

private _renameTag(oldTag, newTag, currentTag): void

Parameters

ParameterType
oldTagstring
newTagstring
currentTagHTMLElement

Returns

void

Source

src/widgets.ts:2237


addCaption()

addCaption(caption): InputBase<any>

Adds the specified caption

Parameters

ParameterType
captionstring

Returns

InputBase<any>

Inherited from

InputBase . addCaption

Source

src/widgets.ts:1175


addOptions()

addOptions(options): InputBase<any>

Adds the specified options

Parameters

ParameterType
optionsHTMLElement

Returns

InputBase<any>

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<any>

Adds the specified postfix

Parameters

ParameterType
postfixstring

Returns

InputBase<any>

Inherited from

InputBase . addPostfix

Source

src/widgets.ts:1181


addTag()

addTag(tag): void

Parameters

ParameterType
tagstring

Returns

void

Source

src/widgets.ts:2254


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


getTags()

getTags(): string[]

Returns

string[]

Source

src/widgets.ts:2275


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


removeTag()

removeTag(tag): void

Parameters

ParameterType
tagstring

Returns

void

Source

src/widgets.ts:2265


save()

save(): any

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

Returns

any

Inherited from

InputBase . save

Source

src/widgets.ts:1153


setTags()

setTags(tags): void

Parameters

ParameterType
tagsstring[]

Returns

void

Source

src/widgets.ts:2279


setTooltip()

setTooltip(msg, tooltipCheck): InputBase<any>

Sets the tooltip

Parameters

ParameterTypeDefault value
msgstringundefined
tooltipChecknull | () => booleannull

Returns

InputBase<any>

Inherited from

InputBase . setTooltip

Source

src/widgets.ts:1204


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