Options
All
  • Public
  • Public/Protected
  • All
Menu

Configuration options for pager components.

Hierarchy

  • PagerOpts

Index

Properties

Optional labelFirst

labelFirst: any

Label for "first page" button. Default: "<<""

Optional labelLast

labelLast: any

Label for "last page" button. Default: ">>"

Optional labelNext

labelNext: any

Label for "next page" button. Default: ">"

Optional labelPrev

labelPrev: any

Label for "prev page" button. Default: "<"

Optional navStep

navStep: number

Page increment for prev / next page buttons. Default: 1

Methods

button

  • button(page: number, curr: number, max: number, label: any, disabled: boolean): any
  • Function producing a single page nav or counter element. MUST be provided by user.

    The function is called with:

    • target page ID
    • current page ID
    • max pageID
    • page label (page number or sourced from these options here)
    • disabled flag as determined by the pager

    If disabled is true, the function should return a version of the button component reflecting this state to the user. E.g. the "prev page" buttons should be disabled if the first page is currently active. Likewise, the currently selected page button will be set to disabled as well.

    Page IDs are zero-based indices, whereas page number labels are one-based. The currently active page ID is only provided for special highlighting cases (optional).

    Parameters

    • page: number
    • curr: number
    • max: number
    • label: any
    • disabled: boolean

    Returns any

groupNext

  • groupNext(ctx: any, next: any, last: any): any
  • Component function to provide wrapper for the next / last nav button group. The next / last args are button components. Optional. Default: ["div.pager-next", next, last]

    Parameters

    • ctx: any
    • next: any
    • last: any

    Returns any

groupPages

  • groupPages(ctx: any, buttons: any[]): any
  • Component function to provide wrapper for the page buttons group. The buttons argument is an array of button components. Optional. Default: ["div.pager-pages", ...buttons]

    Parameters

    • ctx: any
    • buttons: any[]

    Returns any

groupPrev

  • groupPrev(ctx: any, first: any, prev: any): any
  • Component function to provide wrapper for the first / prev nav button group. The first / prev args are button components. Optional. Default: ["div.pager-prev", first, prev]

    Parameters

    • ctx: any
    • first: any
    • prev: any

    Returns any

root

  • root(ctx: any, ...body: any[]): any
  • Pager root component function. Receives all 3 button groups as arguments. Optional. Default: ["div.pager", ...body]

    Parameters

    • ctx: any
    • Rest ...body: any[]

    Returns any

Generated using TypeDoc