au-widget-input-text/IInputTextConfig
Interfaces
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"
}
}
]
}
Properties
defaultValue?
optional defaultValue?: string | number;
The default value of the widget, either a string or number. By default, this is an empty string.
isNumber?
optional isNumber?: boolean;
isTextArea?
optional isTextArea?: boolean;
If true, enables a text area instead of single-line text. The default value is false.
label?
optional label?: string;
A label of the widget. By default, this is an empty string.
max?
optional max?: number;
The max value for the number type. The default value is 999999.
maxLength?
optional maxLength?: number;
The max text length.
min?
optional min?: number;
The min value for the number type. The default value is -999999.
onChange?
optional onChange?: Function | Function[];
A function ("{{#function <expression>}}") or an array of functions. This event triggers when the user changes the text in the widget.
pattern?
optional pattern?: string;
A regular expression to limit input.
patternFlags?
optional patternFlags?: string;
placeholder?
optional placeholder?: string;
A string that is displayed as a hint. By default, this is an empty string.
prompt?
optional prompt?: string;
_Deprecated, use placeholder instead. By default, this is an empty string.
rows?
optional rows?: number;
The widget height in rows if the text area mode is on. The default value is 2.
supportText?
optional supportText?: string;
An optional string. By default, this is an empty string.
supportTextPosition
supportTextPosition: SupportTextPosition;
type?
optional type?: string;
The widget type, either "number" or "text". The default value is "text".
value?
optional value?: string | number;
The current value of the widget if it's used for entering text.