Pilates
    Preparing search index...

    Interface SelectProps<T>

    interface SelectProps<T> {
        autoFocus?: boolean;
        focus?: boolean;
        focusId?: string;
        indicator?: (props: SelectIndicatorProps) => ReactNode;
        initialIndex?: number;
        items: SelectItem<T>[];
        onHighlight?: (item: SelectItem<T>) => void;
        onSelect: (item: SelectItem<T>) => void;
    }

    Type Parameters

    • T
    Index

    Properties

    autoFocus?: boolean

    When focusId is set, take focus on mount if no other focusable currently holds it. Ignored when focusId is undefined.

    focus?: boolean

    Default true. Ignored when focusId is set — focus state then comes from the useFocus registration instead.

    focusId?: string

    Register this Select with useFocus(id) so the surrounding <FocusProvider> (auto-installed by render()) can route Tab / Shift+Tab cycling through it. When set, focus is ignored.

    indicator?: (props: SelectIndicatorProps) => ReactNode

    Custom marker rendered to the left of each row.

    initialIndex?: number

    Default 0; clamped forward to first non-disabled item.

    items: SelectItem<T>[]
    onHighlight?: (item: SelectItem<T>) => void
    onSelect: (item: SelectItem<T>) => void