@antadesign/anta
    Preparing search index...

    Interface SelectFacetSingleUnreviewed

    Pick one option. Value: the chosen option's value (or undefined when cleared). Re-picking the selected option clears it. Options are Select's SelectItems — bare strings or SelectOptions carrying the same fields (value, label, hint, icon, tone, disabled). Option values may be string / number / boolean and round-trip unchanged.

    interface SelectFacetSingle {
        key: string;
        label: string;
        icon?: keyof IconShapes;
        kind: "single";
        options: SelectItem<OptionValue>[];
        filter?: FacetFilter;
        renderOption?: (
            option: SelectOption<OptionValue>,
            state: OptionState<OptionValue>,
        ) => ReactNode;
    }

    Hierarchy

    • FacetBase
      • SelectFacetSingle
    Index
    key: string

    The key for this facet's value in the record. onValueChange reports it as attrs.facet. It must be unique across facets.

    label: string

    The facet's row label in the menu.

    icon?: keyof IconShapes

    Leading icon on the facet's row.

    kind: "single"

    The options — bare strings or SelectOptions (groups / submenus are flattened to their leaves).

    filter?: FacetFilter

    Add a search field atop this facet's flyout that filters its options.

    renderOption?: (
        option: SelectOption<OptionValue>,
        state: OptionState<OptionValue>,
    ) => ReactNode

    Replace the option's label, hint, and icon layout in the flyout and global search results. Receives the option and its value, selected, and disabled state. The row retains selection handling and its indicator. Filtering and summaries still use the option data. Return null to use the default layout.