Hex Core JS
    Preparing search index...

    Function getPageGroupings

    • Returns groups of page numbers for pagination purposes (e.g. "Jump to Page" type buttons).

      If options are provided but exclude a value for boundaryPadding, a default will be computed based on the value of currentPagePadding. This default should be used as it leads to a constant number of page numbers regardless of the current page (to avoid buttons jumping around).

      Parameters

      • pageNumber: number

        The index of the current page (zero-indexed).

      • totalPages: number

        The total number of pages available.

      • Optionaloptions: PageGroupingOptions

        Options for display. (default: {currentPagePadding: 2, boundaryPadding: 5}).

      Returns number[][]