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-buttonsPrevious 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
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| filter | FilterPayload | — | Merged over the stored filter, like a list's permanent filter. |
| filterDefaultValues | FilterPayload | — | The stored filter when no params are stored. |
| limit | number | — | Rows fetched when the cached page cannot serve. Default 1000. |
| linkType | "show" | "edit" | — | Which page the neighbour links point at. Default `"edit"`. |
| meta | unknown | — | |
| ref | Ref<HTMLElement> | — | |
| sort | SortPayload | SortPayload[] | — | Sort used when no params are stored. Default `id ASC`. |
| storeKey | string | false | — | KV namespace the list persisted its params under. `false` ignores them. Default: the resource name. |