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

    Interface ParameterManager<T>

    The ParameterManager sub-controller allows restoring parameters that affect the results (e.g., from the URL).

    interface ParameterManager<T extends Parameters> {
        state: ParameterManagerState<T>;
        subscribe(listener: () => void): Unsubscribe;
        synchronize(parameters: T): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Methods

    Properties

    Methods

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

    • Updates the parameters in the state with the specified parameters and fetches results. Unspecified keys are reset to their initial values.

      Parameters

      • parameters: T

        The parameters to synchronize.

      Returns void

    Properties

    The state relevant to the ParameterManager sub-controller.