The Quickview controller provides an interface for triggering desirable side effects, such as logging UA events to the Coveo Platform, when a user interacts with a quickview.

Example: quickview.fn.tsx

interface Quickview {
    state: QuickviewState;
    fetchResultContent(): void;
    next(): void;
    previous(): void;
    subscribe(listener: () => void): Unsubscribe;
}

Hierarchy (View Summary)

Methods

  • Retrieves the preview content for the configured result. If options.onlyContentURL is true this will update the contentURL state property rather than content.

    Returns void

  • Retrieves the preview content for the next available result in the current result set.

    If it reaches the last available result in the current result set, it will not perform an additional query to fetch new results.

    Instead, it will loop back to the first available result.

    If options.onlyContentURL is true this will update the contentURL state property rather than content.

    Returns void

  • Retrieves the preview content for the previous available result in the current result set.

    If it reaches the first available result in the current result set, it will not perform an additional query to fetch new results.

    Instead, it will loop back to the last available result.

    If options.onlyContentURL is true this will update the contentURL state property rather than content.

    Returns void

  • 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 for the Quickview controller.