Kvaser CanKing GUI Extensions SDK v7.6.1
Kvaser CanKing GUI Extensions SDK / controls / TextControlProps
Interface: TextControlProps
Properties of the TextControl React component.
Properties
disabled?
optionaldisabled?:boolean
Set to true to disable this control.
endAdornment?
optionalendAdornment?:ReactNode
A text or component to be displayed after the value.
error?
optionalerror?:boolean
The current error state.
fullWidth?
optionalfullWidth?:boolean
Set to true to expand this control to use the full widht of its parent.
helperText?
optionalhelperText?:string
Any helper text that should be displayed.
id?
optionalid?:string
The component id.
inputMode?
optionalinputMode?:"search"|"text"|"none"|"tel"|"url"|"email"|"numeric"|"decimal"
Input mode.
label?
optionallabel?:string
The label of this input control.
margin?
optionalmargin?:"none"|"normal"|"dense"
Margins between controls inside this control.
onBlur?
optionalonBlur?: () =>void
Callback that will be called when the control has lost focus.
Returns
void
onChange?
optionalonChange?: (value) =>void
Callback that will be called when the value has been changed.
Parameters
value
string
The new value.
Returns
void
onKeyDown?
optionalonKeyDown?:KeyboardEventHandler<HTMLDivElement>
Override default onKeyDown behavior. By default, pressing Enter will blur the input.
pattern?
optionalpattern?:string
Regex pattern of the value in this control.
required?
optionalrequired?:boolean
Set to true if this control’s value is required.
size?
optionalsize?:"small"|"medium"
The component size.
startAdornment?
optionalstartAdornment?:ReactNode
A text or component to be displayed in front of the value.
sx?
optionalsx?:SxProps<Theme>
Optional sx properties.
sxEndAdornment?
optionalsxEndAdornment?:SxProps<Theme>
Optional sx properties for the end adornment.
sxStartAdornment?
optionalsxStartAdornment?:SxProps<Theme>
Optional sx properties for the start adornment.
value
value:
string
The current value.