@coveo/headless
    Preparing search index...

    Interface AttachedResultsActionCreators

    The attached results action creators.

    See Dispatch actions.

    interface AttachedResultsActionCreators {
        attachResult(
            payload: AttachedResult,
        ): { payload: AttachedResult; type: string };
        detachResult(
            payload: AttachedResult,
        ): { payload: AttachedResult; type: string };
        setAttachedResults(
            payload: SetAttachedResultsActionCreatorPayload,
        ): { payload: SetAttachedResultsActionCreatorPayload; type: string };
    }
    Index

    Methods

    • Creates an action that sets the attached results to a record.

      Parameters

      • payload: SetAttachedResultsActionCreatorPayload

        The action creator payload.

      Returns { payload: SetAttachedResultsActionCreatorPayload; type: string }

      A dispatchable action.

      const {setAttachedResults} = loadInsightAttachedResultsActions(engine);
      

      engine.dispatch(setAttachedResults(attachedResults, loading));