@coveo/headless
    Preparing search index...

    Interface InstantResultsState

    A scoped and simplified part of the Headless state that is relevant to the InstantResults controller.

    interface InstantResultsState {
        error: null | SerializedError | SearchAPIErrorWithStatusCode;
        isLoading: boolean;
        q: string;
        results: Result[];
    }
    Index

    Properties

    error: null | SerializedError | SearchAPIErrorWithStatusCode

    An error returned when executing an instant results request, if any. This is null otherwise.

    isLoading: boolean

    Determines if a search is in progress for the current query.

    q: string

    The current query for instant results.

    results: Result[]

    The instant results for the current query.