@coveo/headless-react
    Preparing search index...

    Interface StaticFilter

    The StaticFilter controller manages a collection of filter values.

    Example: static-filter.fn.tsx

    interface StaticFilter {
        state: StaticFilterState;
        deselectAll(): void;
        isValueExcluded(value: StaticFilterValue): boolean;
        isValueSelected(value: StaticFilterValue): boolean;
        subscribe(listener: () => void): Unsubscribe;
        toggleExclude(value: StaticFilterValue): void;
        toggleSelect(value: StaticFilterValue): void;
        toggleSingleExclude(value: StaticFilterValue): void;
        toggleSingleSelect(value: StaticFilterValue): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Deselects all static filter values.

      Returns void

    • Checks whether the specified static filter value is excluded.

      Parameters

      Returns boolean

      Whether the specified static filter value is excluded.

    • Checks whether the specified static filter value is selected.

      Parameters

      Returns boolean

      Whether the specified static filter value is selected.

    • Adds a callback that's invoked on state change.

      Parameters

      • listener: () => void

        A callback that's invoked on state change.

      Returns Unsubscribe

      A function to remove the listener.

    • Excludes the specified static filter value.

      Parameters

      Returns void

    • Toggles the specified static filter value.

      Parameters

      Returns void

    • Excludes the specified static filter value, deselecting others.

      Parameters

      Returns void

    • Toggles the specified static filter value, deselecting others.

      Parameters

      Returns void

    Properties

    A state of the StaticFilter controller.