@kanunilabs/datagrid-react / GridPagerProps
Interface: GridPagerProps
Properties
labels?
optionallabels?:Partial<Record<"first"|"previous"|"next"|"last"|"page"|"of"|"rowsPerPage"|"pageButton"|"navigation",string>>
Overrides for the pager's words. pageButton is a numbered button's
accessible name, with {n} for the page; navigation names the pager
itself.
maxPageButtons?
optionalmaxPageButtons?:number
Most slots the numbered buttons take, ellipses included. Default 7, at least 5.
onNext
onNext: () =>
void
RELATIVE moves go through their own callbacks so they read the controller's
current page instead of this component's prop: two clicks landing in the
same React commit would otherwise both compute page + 1 from the same
stale value and advance only one page.
Returns
void
onPage
onPage: (
page) =>void
Absolute jump (first/last, and a numbered page button).
Parameters
page
number
Returns
void
onPageSize
onPageSize: (
size) =>void
Parameters
size
number
Returns
void
onPrevious
onPrevious: () =>
void
Returns
void
page
page:
number
pageButtons?
optionalpageButtons?:boolean
Numbered page buttons — 1 2 3 … 40 — in place of "Page 3 of 40"
(pagination.pageButtons). The current page's button carries
aria-current="page".
pageCount
pageCount:
number
pageSize
pageSize:
number
pageSizes?
optionalpageSizes?:number[]
totalRows
totalRows:
number
Rows after filtering (the thing being paged through).