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

    Interface InteractiveProduct

    The InteractiveProduct sub-controller provides an interface for handling long presses, multiple clicks, etc. to ensure analytics events are logged properly when a user selects a product.

    interface InteractiveProduct {
        warningMessage?: string;
        beginDelayedSelect(): void;
        cancelPendingSelect(): void;
        select(): void;
    }

    Hierarchy

    • InteractiveResultCore
      • InteractiveProduct
    Index

    Methods

    • Prepares to select the result after a certain delay, logging an analytics event if the result wasn't selected before.

      In a DOM context, it's recommended to call this method on the touchstart event.

      Returns void

    • Cancels the pending selection caused by beginDelayedSelect.

      In a DOM context, it's recommended to call this method on the touchend event.

      Returns void

    • Selects the result, logging an analytics event to the Coveo Platform if the result wasn't selected before.

      In a DOM context, it's recommended to call this method on all of the following events:

      • contextmenu
      • click
      • mouseup
      • mousedown

      Returns void

    Properties

    warningMessage?: string