Skip to content

@serenity-is/corelib / PagerOptions

Interface: PagerOptions

Defined in: src/slick/slicktypes.ts:67

Options for the slick pager control.

Properties

getInfoText()?

optional getInfoText: (info) => RenderableContent

Defined in: src/slick/slicktypes.ts:83

Gets the content the pager shows before its controls, e.g. the totals of the page and of all the rows. It is called on every update, so it can follow the rows, and it is not shown when it returns nothing. A string is shown as text, so anything with markup is returned as an element or a fragment instead. The content is only rendered again when what it returns changes, so a function that builds a new element on every call renders on every update too. Default is what the view gives, see IRemoteView.getPagingInfoText.

Parameters

info

PagingInfo

Returns

RenderableContent


grid?

optional grid: ISleekGrid

Defined in: src/slick/slicktypes.ts:74

The grid that shows the rows of the view. It is given to a view that loads its rows as the grid is scrolled, see IGridBoundView.bindToGrid.


indeterminatePaging?

optional indeterminatePaging: boolean

Defined in: src/slick/slicktypes.ts:102

Whether to page without the total number of the rows: no last page button, no total of the pages, and a next page button that is only enabled while there are more rows. Default is the setting of the view, see RemoteViewOptions.indeterminatePaging.


onChangePage()?

optional onChangePage: (newPage) => void

Defined in: src/slick/slicktypes.ts:104

Callback when page changes.

Parameters

newPage

number

New page index (1-based).

Returns

void


onRowsPerPageChange()?

optional onRowsPerPageChange: (n) => void

Defined in: src/slick/slicktypes.ts:106

Callback when rows-per-page changes.

Parameters

n

number

New rows-per-page value.

Returns

void


rowsPerPage?

optional rowsPerPage: number

Defined in: src/slick/slicktypes.ts:95

Current rows per page.


rowsPerPageOptions?

optional rowsPerPageOptions: number[]

Defined in: src/slick/slicktypes.ts:97

Choices for rows-per-page selector.


showFirstLast?

optional showFirstLast: boolean

Defined in: src/slick/slicktypes.ts:91

Whether to show the buttons that go to the first and last pages, which most pagers leave out, as the page box takes a number anyway. Shift+click on the previous and next buttons goes to the first and last pages instead, while they are left out. Default is SlickPager.defaults.showFirstLast, which is false.


showReload?

optional showReload: boolean

Defined in: src/slick/slicktypes.ts:93

Whether to show a reload button. Default is true, even when the grid has a refresh button of its own.


showRowsPerPage?

optional showRowsPerPage: boolean

Defined in: src/slick/slicktypes.ts:85

Whether to show rows-per-page selector.


view?

optional view: any

Defined in: src/slick/slicktypes.ts:69

Data view instance.