PrevNextButtons

Previous and next links that step through the records of the list the current record came from. usePrevNextController is the hook for building your own buttons.

Installation

pnpm dlx shadcn@latest add @chelone/prev-next-buttons

Previous and next links that step through the records of the list the current record came from. usePrevNextController is the hook for building your own buttons.

Props

PropTypeDefaultDescription
classNamestring—
filterFilterPayload—Merged over the stored filter, like a list's permanent filter.
filterDefaultValuesFilterPayload—The stored filter when no params are stored.
limitnumber—Rows fetched when the cached page cannot serve. Default 1000.
linkType"show" | "edit"—Which page the neighbour links point at. Default `"edit"`.
metaunknown—
refRef<HTMLElement>—
sortSortPayload | SortPayload[]—Sort used when no params are stored. Default `id ASC`.
storeKeystring | false—KV namespace the list persisted its params under. `false` ignores them. Default: the resource name.