@coveo/headless
    Preparing search index...

    Interface FacetState

    A scoped and simplified part of the headless state that is relevant to the Facet controller.

    interface FacetState {
        canShowLessValues: boolean;
        canShowMoreValues: boolean;
        enabled: boolean;
        facetId: string;
        facetSearch: FacetSearchState;
        hasActiveValues: boolean;
        isLoading: boolean;
        label?: string;
        sortCriterion: FacetSortCriterion;
        tabs?: { excluded?: string[]; included?: string[] };
        values: FacetValue[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    canShowLessValues: boolean

    true if fewer values can be displayed and false otherwise.

    canShowMoreValues: boolean

    true if there are more values to display and false otherwise.

    enabled: boolean

    Whether the facet is enabled and its values are used to filter search results.

    facetId: string

    The facet ID.

    facetSearch: FacetSearchState

    The state of the facet's searchbox.

    hasActiveValues: boolean

    true if there is at least one non-idle value and false otherwise.

    isLoading: boolean

    true if a search is in progress and false otherwise.

    label?: string

    The name to display if this field is used by the Facet Generator in your interface. See Change Facet Generator options.

    sortCriterion: FacetSortCriterion

    The active sortCriterion of the facet.

    tabs?: { excluded?: string[]; included?: string[] }

    The tabs on which the facet should be enabled or disabled.

    values: FacetValue[]

    The values of the facet.