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

    Interface NumericFilter

    The NumericFilter controller makes it possible to create a numeric filter.

    Example: numeric-filter.fn.tsx

    interface NumericFilter {
        state: NumericFilterState;
        clear(): void;
        disable(): void;
        enable(): void;
        setRange(range: NumericFilterRange): boolean;
        subscribe(listener: () => void): Unsubscribe;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Clears the current filter.

      Returns void

    • Disables the filter. I.e., prevents it from filtering results.

      Returns void

    • Enables the filter. I.e., undoes the effects of disable.

      Returns void

    • Updates the selected range.

      Parameters

      Returns boolean

      Whether the range is valid.

    • 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.

    Properties

    The state of the NumericFilter controller.