Interface IInputTextConfig
Provides properties for an input field. You can use these properties in params of the AuWidgetInputText class.
{
"widgets": [
{
"name": "quantity",
"title": "Quantity",
"type": "input-text",
"params": {
"defaultValue": "{{ order.quantity }}",
"placeholder": "Quantity",
"type": "number",
"min": "1"
}
}
]
}
Package: ui-framework
Properties
defaultValue
The default value of the widget, either a string or number. By default, this is an empty string.
Declaration
defaultValue?: string | number
Property Value
Type | Description |
---|---|
string | number | The default value of the widget, either a string or number. By default, this is an empty string. |
isNumber
Declaration
isNumber?: boolean
Property Value
Type | Description |
---|---|
boolean |
isTextArea
If true
, enables a text area instead of single-line text. The default value is false
.
Declaration
isTextArea?: boolean
Property Value
Type | Description |
---|---|
boolean | If |
label
A label of the widget. By default, this is an empty string.
Declaration
label?: string
Property Value
Type | Description |
---|---|
string | A label of the widget. By default, this is an empty string. |
max
The max value for the number
type. The default value is 999999
.
Declaration
max?: number
Property Value
Type | Description |
---|---|
number | The max value for the |
maxLength
The max text length.
Declaration
maxLength?: number
Property Value
Type | Description |
---|---|
number | The max text length. |
min
The min value for the number
type. The default value is -999999
.
Declaration
min?: number
Property Value
Type | Description |
---|---|
number | The min value for the |
onChange
A function ("{{#function <expression>}}"
) or an array of functions. This event triggers when the user changes the text in the widget.
Declaration
onChange?: Function | Array<Function>
Property Value
Type | Description |
---|---|
Function | Array<Function> | A function ( |
pattern
A regular expression to limit input.
Declaration
pattern?: string
Property Value
Type | Description |
---|---|
string | A regular expression to limit input. |
patternFlags
Declaration
patternFlags?: string
Property Value
Type | Description |
---|---|
string |
placeholder
A string that is displayed as a hint. By default, this is an empty string.
Declaration
placeholder?: string
Property Value
Type | Description |
---|---|
string | A string that is displayed as a hint. By default, this is an empty string. |
prompt
_Deprecated, use placeholder instead. By default, this is an empty string.
Declaration
prompt?: string
Property Value
Type | Description |
---|---|
string | _Deprecated, use placeholder instead. By default, this is an empty string. |
rows
The widget height in rows if the text area mode is on. The default value is 2
.
Declaration
rows?: number
Property Value
Type | Description |
---|---|
number | The widget height in rows if the text area mode is on. The default value is |
supportText
An optional string. By default, this is an empty string.
Declaration
supportText?: string
Property Value
Type | Description |
---|---|
string | An optional string. By default, this is an empty string. |
supportTextPosition
Declaration
supportTextPosition: SupportTextPosition
Property Value
Type | Description |
---|---|
SupportTextPosition |
type
The widget type, either "number"
or "text"
. The default value is "text"
.
Declaration
type?: string
Property Value
Type | Description |
---|---|
string | The widget type, either |
value
The current value of the widget if it's used for entering text.
Declaration
value?: string | number
Property Value
Type | Description |
---|---|
string | number | The current value of the widget if it's used for entering text. |