CursorPagination
Loading example…
Footer for server-side cursor paging, where the total is unknown: the range on screen (“Showing 26–50”) and Previous / Next. Keep the cursor trail yourself; this only reports the clicks. It renders nothing while the whole list fits on the first page.
Import
Section titled “Import”import { CursorPagination } from "@jcsoftdev/ui/containers";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/pagination.
<CursorPagination total={134} />| Prop | Type | Default | Description |
|---|---|---|---|
page * |
number |
1-based page the cursor trail is on. | |
count * |
number |
Rows on this page. | |
pageSize |
number |
25 |
Rows per page, to number the range. Default 25. |
hasNext * |
boolean |
Whether the server reported a next cursor. | |
onPrevious * |
() => void |
||
onNext * |
() => void |
||
labels |
Partial<CursorPaginationLabels> |
Texts (localized by default through UiStrings). |
* marks a required prop.
It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).
Storybook stories
Section titled “Storybook stories”- Default
- Controlled
- Empty
- Narrow
- Pages
- Pages Spanish
- Pages Single Page
- Client Side
- Cursor
- Cursor Single Page
Source
Section titled “Source”packages/ui/src/containers/pagination/cursor-pagination.tsx