Class: JsInputBase<T>
dg.JsInputBase
Base class for JS value editors
Type parameters
Name | Type |
---|---|
T | any |
Hierarchy
InputBase
<T
>↳
JsInputBase
Constructors
constructor
• new JsInputBase<T
>()
Type parameters
Name | Type |
---|---|
T | any |
Overrides
Defined in
Properties
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
• Abstract
get
dataType(): string
Data type this input can edit. See Type.
Returns
string
Overrides
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
Overrides
InputBase.input
Defined in
inputType
• Abstract
get
inputType(): string
Input type identifier (such as "Slider" for the slider input). See InputType.
Returns
string
Overrides
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
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
Overrides
InputBase.stringValue
Defined in
• set
stringValue(value
): void
Parameters
Name | Type |
---|---|
value | string |
Returns
void
Overrides
InputBase.stringValue
Defined in
value
• get
value(): T
Input value
Returns
T
Overrides
InputBase.value
Defined in
• set
value(value
): void
Parameters
Name | Type |
---|---|
value | T |
Returns
void
Overrides
InputBase.value
Defined in
Methods
addCaption
▸ addCaption(caption
): InputBase
<T
>
Adds the specified caption
Parameters
Name | Type |
---|---|
caption | string |
Returns
InputBase
<T
>
Inherited from
Defined in
addOptions
▸ addOptions(options
): InputBase
<T
>
Adds the specified options
Parameters
Name | Type |
---|---|
options | HTMLElement |
Returns
InputBase
<T
>
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
<T
>
Adds the specified postfix
Parameters
Name | Type |
---|---|
postfix | string |
Returns
InputBase
<T
>
Inherited from
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
getInput
▸ Abstract
getInput(): HTMLElement
Returns
HTMLElement
Defined in
getStringValue
▸ Abstract
getStringValue(): string
Returns
string
Defined in
getValue
▸ Abstract
getValue(): T
Returns
T
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
save
▸ save(): any
Saves the value. Used in dialog history. See also load
Returns
any
Inherited from
Defined in
setStringValue
▸ Abstract
setStringValue(value
): void
Parameters
Name | Type |
---|---|
value | string |
Returns
void
Defined in
setTooltip
▸ setTooltip(msg
, tooltipCheck?
): InputBase
<T
>
Sets the tooltip
Parameters
Name | Type | Default value |
---|---|---|
msg | string | undefined |
tooltipCheck | null | () => boolean | null |
Returns
InputBase
<T
>
Inherited from
Defined in
setValue
▸ Abstract
setValue(value
): void
Parameters
Name | Type |
---|---|
value | T |
Returns
void
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
>