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?

optional disabled?: boolean

Set to true to disable this control.


endAdornment?

optional endAdornment?: ReactNode

A text or component to be displayed after the value.


error?

optional error?: boolean

The current error state.


fullWidth?

optional fullWidth?: boolean

Set to true to expand this control to use the full widht of its parent.


helperText?

optional helperText?: string

Any helper text that should be displayed.


id?

optional id?: string

The component id.


inputMode?

optional inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal"

Input mode.


label?

optional label?: string

The label of this input control.


margin?

optional margin?: "none" | "normal" | "dense"

Margins between controls inside this control.


onBlur?

optional onBlur?: () => void

Callback that will be called when the control has lost focus.

Returns

void


onChange?

optional onChange?: (value) => void

Callback that will be called when the value has been changed.

Parameters

value

string

The new value.

Returns

void


onKeyDown?

optional onKeyDown?: KeyboardEventHandler<HTMLDivElement>

Override default onKeyDown behavior. By default, pressing Enter will blur the input.


pattern?

optional pattern?: string

Regex pattern of the value in this control.


required?

optional required?: boolean

Set to true if this control’s value is required.


size?

optional size?: "small" | "medium"

The component size.


startAdornment?

optional startAdornment?: ReactNode

A text or component to be displayed in front of the value.


sx?

optional sx?: SxProps<Theme>

Optional sx properties.


sxEndAdornment?

optional sxEndAdornment?: SxProps<Theme>

Optional sx properties for the end adornment.


sxStartAdornment?

optional sxStartAdornment?: SxProps<Theme>

Optional sx properties for the start adornment.


value

value: string

The current value.