The ResultList headless controller offers a high-level interface for designing a common result list UI controller.

Example: result-list.fn.tsx

interface ResultList {
    state: ResultListState;
    fetchMoreResults(): void;
    subscribe(listener: () => void): Unsubscribe;
}

Hierarchy (View Summary)

Methods

Properties

Methods

  • Using the same parameters as the last successful query, fetch another batch of results, if available. Particularly useful for infinite scrolling, for example.

    This method is not compatible with the Pager controller.

    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 of the ResultList controller.