Interface PaginationLinks<RT, E> sincev5.9.0
Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:236
Hideconstructor
The reactive set of navigation links derived from a PaginationState. Where PaginationState tracks which pages are loaded and which one is active, PaginationLinks turns that page graph into the links a UI renders to move between pages.
It provides two kinds of link:
- links: the numbered links, with PlaceholderPaginationLink placeholders standing in for gaps of not-yet-loaded pages. Only numbered collections (where the server exposes page numbers) produce these.
- prev and next: the relational links for the active page. Available in both numbered and cursor-based pagination, and the only links a cursor-based collection has.
- first and last: the relational links to the collection's edges, when the response exposes them. Usually present on every page — including the edge page itself, where the link's isCurrent is
true.
Every link updates as pages load and as the active page changes, since they read straight from the state's shared page graph. To get the links for a state, use getPaginationLinks.
See also:
Type Parameters
RT
RT = unknown
E
E = unknown
Properties
first
Get Signature
get first(): RelationalPaginationLink | null;Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:252
The relational first link of the collection, or null when the active page's response did not expose one. Unlike prev/next it is usually present on every page — including the first page itself, where the link's isCurrent is true (useful for disabling the control).
Returns
RelationalPaginationLink | null
last
Get Signature
get last(): RelationalPaginationLink | null;Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:292
The relational last link of the collection, or null when the active page's response did not expose one. Mirror of first for the end of the collection.
Returns
RelationalPaginationLink | null
links
Get Signature
get links(): PaginationLink[];Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:308
The numbered links and placeholders, derived from the shared page graph.
Only produced for numbered pagination (where the server exposes page numbers). Cursor-based collections have no page numbers, so this is empty — use prev/next for cursor navigation.
Returns
next
Get Signature
get next(): RelationalPaginationLink | null;Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:278
The relational next link for the active page, or null at the end of the collection. Available in both numbered and cursor pagination.
Returns
RelationalPaginationLink | null
prev
Get Signature
get prev(): RelationalPaginationLink | null;Defined in: warp-drive-packages/core/src/signals/pagination-links.ts:265
The relational prev link for the active page, or null at the start of the collection. Available in both numbered and cursor pagination.
Returns
RelationalPaginationLink | null