Properties of the SelectControl React component.

interface SelectControlProps {
    disabled?: boolean;
    fullWidth?: boolean;
    helperText?: string;
    id: string;
    label: string;
    margin?: "none" | "normal" | "dense";
    minWidth?: string | number;
    onChange: (value: number | "") => void;
    options: SelectOption[] | Map<string, SelectOption[]>;
    prefixTextWithValue?: boolean;
    required?: boolean;
    showLabel?: boolean;
    size?: "small" | "medium";
    value: number | "";
}

Properties

disabled?: boolean

Set to true to disable this control.

fullWidth?: boolean

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

helperText?: string

A helper text that will be displayed underneath the select control.

id: string

The component id.

label: string

A label text that will be displayed in front of the select control.

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

Margins between controls inside this control.

minWidth?: string | number

The min width of this control.

onChange: (value: number | "") => void

Callback that will be called when a new option has been selected.

Type declaration

    • (value: number | ""): void
    • Parameters

      • value: number | ""

        The new selected value.

      Returns void

options: SelectOption[] | Map<string, SelectOption[]>

The options to be available inside the select control.

prefixTextWithValue?: boolean

Set to true to display each option as ' - ', otherwise each option will be displayed with its displayText only.

required?: boolean

Set to true if the value of this control is required.

showLabel?: boolean

Set to true to display the label.

size?: "small" | "medium"

The component size.

value: number | ""

Value of the selected option or '' if no option has been selected.