Module: utils-pagination

Utilities for dealing with pagination.

Source:

Members

(static, constant) createPaginationTemplateParamsObject

Source:

(static, constant) makeItem

Turn items in array returned by pagination into items conforming to the PaginationItem schema.

Source:

(static, constant) pagination

Generate pagination numbers with ellipsis for long ranges

Source:

Type Definitions

PaginationItem

Type:
  • Object
Properties:
Name Type Attributes Description
type 'ellipsis' | 'number'

Type of pagination item

number number <optional>

Page number (for number type)

href string

Link URL

ellipsis boolean <optional>

Whether this is an ellipsis item

current boolean <optional>

Whether this is the current page

Source:

PaginationNav

Type:
  • Object
Properties:
Name Type Attributes Description
previous Object <optional>

Previous page link

Properties
Name Type Description
href string

Previous page URL

next Object <optional>

Next page link

Properties
Name Type Description
href string

Next page URL

items Array.<module:utils~PaginationItem>

Pagination items

Source: