Class: TagsInput
dg.TagsInput
Input control base. Could be used for editing Property values as well. The root is a div that consists of captionLabel and input.
Hierarchy
↳
TagsInput
Constructors
constructor
• new TagsInput(name
, config?
)
Parameters
Name | Type |
---|---|
name | string |
config? | TagsInputConfig |
Overrides
Defined in
Properties
_addTagIcon
• Private
_addTagIcon: HTMLElement
Defined in
_onTagAdded
• Private
_onTagAdded: Subject
<string
>
Defined in
_onTagRemoved
• Private
_onTagRemoved: Subject
<string
>
Defined in
_tags
• Private
_tags: string
[]
Defined in
_tagsDiv
• Private
_tagsDiv: HTMLDivElement
Defined in
dart
• dart: any
Inherited from
Defined in
Accessors
caption
• get
caption(): string
Returns
string
Inherited from
InputBase.caption
Defined in
• set
caption(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Inherited from
InputBase.caption
Defined in
captionLabel
• get
captionLabel(): HTMLElement
Returns
HTMLElement
Inherited from
InputBase.captionLabel
Defined in
classList
• get
classList(): DOMTokenList
Returns
DOMTokenList
Inherited from
InputBase.classList
Defined in
dataType
• get
dataType(): string
Data type this input can edit. See Type.
Returns
string
Inherited from
InputBase.dataType
Defined in
enabled
• get
enabled(): boolean
Whether the input is enabled
Returns
boolean
Inherited from
InputBase.enabled
Defined in
• set
enabled(v
): void
Parameters
Name | Type |
---|---|
v | boolean |
Returns
void
Inherited from
InputBase.enabled
Defined in
format
• get
format(): string
Value format.
Returns
string
Inherited from
InputBase.format
Defined in
• set
format(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Inherited from
InputBase.format
Defined in
input
• get
input(): HTMLElement
Returns the actual input
Returns
HTMLElement
Inherited from
InputBase.input
Defined in
inputType
• get
inputType(): string
Input type identifier (such as "Slider" for the slider input). See InputType.
Returns
string
Inherited from
InputBase.inputType
Defined in
notify
• get
notify(): boolean
Whether events are thrown on value set
Returns
boolean
Inherited from
InputBase.notify
Defined in
• set
notify(v
): void
Parameters
Name | Type |
---|---|
v | boolean |
Returns
void
Inherited from
InputBase.notify
Defined in
nullable
• get
nullable(): boolean
Whether empty values are allowed
Returns
boolean
Inherited from
InputBase.nullable
Defined in
• set
nullable(v
): void
Parameters
Name | Type |
---|---|
v | boolean |
Returns
void
Inherited from
InputBase.nullable
Defined in
onTagAdded
• get
onTagAdded(): Observable
<string
>
Returns
Observable
<string
>
Defined in
onTagRemoved
• get
onTagRemoved(): Observable
<string
>
Returns
Observable
<string
>
Defined in
property
• get
property(): any
Property if associated with
Returns
any
Inherited from
InputBase.property
Defined in
• set
property(p
): void
Parameters
Name | Type |
---|---|
p | Property |
Returns
void
Inherited from
InputBase.property
Defined in
readOnly
• get
readOnly(): boolean
Whether the input is readonly
Returns
boolean
Inherited from
InputBase.readOnly
Defined in
• set
readOnly(v
): void
Parameters
Name | Type |
---|---|
v | boolean |
Returns
void
Inherited from
InputBase.readOnly
Defined in
root
• get
root(): HTMLElement
Visual root (typically a div element that contains caption and input)
Returns
HTMLElement
Inherited from
InputBase.root
Defined in
stringValue
• get
stringValue(): string
String representation of the value
Returns
string
Inherited from
InputBase.stringValue
Defined in
• set
stringValue(s
): void
Parameters
Name | Type |
---|---|
s | string |
Returns
void
Inherited from
InputBase.stringValue
Defined in
value
• get
value(): T
Input value
Returns
T
Inherited from
InputBase.value
Defined in
• set
value(x
): void
Parameters
Name | Type |
---|---|
x | T |
Returns
void
Inherited from
InputBase.value
Defined in
Methods
_createRoot
▸ Private
_createRoot(): void
Returns
void
Defined in
_createTag
▸ Private
_createTag(tag
): HTMLElement
Parameters
Name | Type |
---|---|
tag | string |
Returns
HTMLElement
Defined in
_createTagEditInput
▸ Private
_createTagEditInput(currentTag
): HTMLInputElement
Parameters
Name | Type |
---|---|
currentTag | HTMLElement |
Returns
HTMLInputElement
Defined in
_initEventListeners
▸ Private
_initEventListeners(): void
Returns
void
Defined in
_isProper
▸ Private
_isProper(tag
): boolean
Parameters
Name | Type |
---|---|
tag | string |
Returns
boolean
Defined in
_renameTag
▸ Private
_renameTag(oldTag
, newTag
, currentTag
): void
Parameters
Name | Type |
---|---|
oldTag | string |
newTag | string |
currentTag | HTMLElement |
Returns
void
Defined in
addCaption
▸ addCaption(caption
): InputBase
<any
>
Adds the specified caption
Parameters
Name | Type |
---|---|
caption | string |
Returns
InputBase
<any
>
Inherited from
Defined in
addOptions
▸ addOptions(options
): InputBase
<any
>
Adds the specified options
Parameters
Name | Type |
---|---|
options | HTMLElement |
Returns
InputBase
<any
>
Inherited from
Defined in
addPatternMenu
▸ addPatternMenu(pattern
): void
Adds a usage example to the input's hamburger menu
Parameters
Name | Type |
---|---|
pattern | any |
Returns
void
Inherited from
Defined in
addPostfix
▸ addPostfix(postfix
): InputBase
<any
>
Adds the specified postfix
Parameters
Name | Type |
---|---|
postfix | string |
Returns
InputBase
<any
>
Inherited from
Defined in
addTag
▸ addTag(tag
): void
Parameters
Name | Type |
---|---|
tag | string |
Returns
void
Defined in
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
Name | Type |
---|---|
validator | (value : string ) => null | string |
Returns
void
Inherited from
Defined in
fireChanged
▸ fireChanged(): any
Fires the 'changed' event (value has changed). See also fireInput
Returns
any
Inherited from
Defined in
fireInput
▸ fireInput(): any
Fires the 'input' event (user input). See also fireChanged
Returns
any
Inherited from
Defined in
getTags
▸ getTags(): string
[]
Returns
string
[]
Defined in
init
▸ init(): any
Returns
any
Inherited from
Defined in
load
▸ load(s
): any
Loads the value. Used in dialog history. See also load
Parameters
Name | Type |
---|---|
s | any |
Returns
any
Inherited from
Defined in
onChanged
▸ onChanged(callback
): StreamSubscription
Occurs when [value] is changed, either by user or programmatically.
Parameters
Name | Type |
---|---|
callback | Function |
Returns
Inherited from
Defined in
onInput
▸ onInput(callback
): StreamSubscription
Occurs when [value] is changed by user.
Parameters
Name | Type |
---|---|
callback | Function |
Returns
Inherited from
Defined in
removeTag
▸ removeTag(tag
): void
Parameters
Name | Type |
---|---|
tag | string |
Returns
void
Defined in
save
▸ save(): any
Saves the value. Used in dialog history. See also load
Returns
any
Inherited from
Defined in
setTags
▸ setTags(tags
): void
Parameters
Name | Type |
---|---|
tags | string [] |
Returns
void
Defined in
setTooltip
▸ setTooltip(msg
, tooltipCheck?
): InputBase
<any
>
Sets the tooltip
Parameters
Name | Type | Default value |
---|---|---|
msg | string | undefined |
tooltipCheck | null | () => boolean | null |
Returns
InputBase
<any
>
Inherited from
Defined in
forColumn
▸ Static
forColumn<T
>(column
): InputBase
<null
| T
>
Creates input for the specified column
Type parameters
Name | Type |
---|---|
T | any |
Parameters
Name | Type |
---|---|
column | Column <T > |
Returns
InputBase
<null
| T
>
Inherited from
Defined in
forInputType
▸ Static
forInputType(inputType
): InputBase
<any
>
Creates input for the specified input type
Parameters
Name | Type |
---|---|
inputType | string | InputType |
Returns
InputBase
<any
>
Inherited from
Defined in
forProperty
▸ Static
forProperty(property
, source?
): InputBase
<any
>
Creates input for the specified property, and optionally binds it to the specified object
Parameters
Name | Type | Default value |
---|---|---|
property | Property | undefined |
source | any | null |
Returns
InputBase
<any
>