Searchstax PaginationWidget for React and Next.js


The SearchStax Site Search solution offers a pagination widget for React and Next.js search pages.

The SearchstaxPaginationWidget displays pagination controls for search results.

Usage

<SearchstaxPaginationWidget />

Props

  • paginationTemplate – Renders custom pagination UI.

paginationTemplate

Customize the pagination UI.

It receives:

  • paginationData – Pagination data object
  • nextPage – Handles next page click
  • previousPage – Handles previous page click

Example

<SearchstaxPaginationWidget
  paginationTemplate={(paginationData, nextPage, previousPage) => (
    <div>
      {/* Custom pagination UI */}

      <button onClick={previousPage}>Prev</button>

      <button onClick={nextPage}>Next</button>
    </div>
  )}
/>

The paginationData object contains:

  • totalResults – Total number of results
  • startResultIndex – Start index of current page
  • endResultIndex – End index of current page
  • isFirstPage – Whether on first page
  • isLastPage – Whether on last page

Questions?

Do not hesitate to contact the SearchStax Support Desk.