@antadesign/anta
    Preparing search index...

    Interface SelectFacetCustom<V>Unreviewed

    A custom editor and value type for values the built-in kinds do not cover, including objects such as date ranges and numeric comparisons.

    interface SelectFacetCustom<V = unknown> {
        key: string;
        label: string;
        icon?: keyof IconShapes;
        kind: "custom";
        render: (ctx: SelectFacetCustomContext<V>) => ReactNode;
        summary: (value: V) => ReactNode;
    }

    Type Parameters

    • V = unknown

    Hierarchy

    • FacetBase
      • SelectFacetCustom
    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: "custom"
    render: (ctx: SelectFacetCustomContext<V>) => ReactNode

    Render the facet's editor inside its flyout. The returned node stays mounted while the menu is open.

    summary: (value: V) => ReactNode

    Reduce an active value to a short summary shown on the facet's row (a string or any node). Called only when the value is set.