API/QubeeListHandle
QubeeListHandle
typesrc/types/qubee-list-handle.type.ts7 members
What useQubeeList returns for a list definition TList.
Function members are properties, so the handle can be destructured. toggleSort is present
when the list declares exactly one sortParam — see SortToggle.
Import
Section titled “Import”import type { QubeeListHandle } from '@qubeejs/react';Definition
Section titled “Definition”type QubeeListHandle<TList> = { … } & SortToggle<TList>Members
Section titled “Members”Everything in SortToggle<TList>, plus:
| Member | Type | Description |
|---|---|---|
href |
(changes?: Partial<ListState<TList>>) => string |
The href for the current state with changes applied — for <a> and <Link>, which stay crawlable, prefetchable and middle-clickable. Built from the draft, so it includes anything set() has not committed yet. |
isPending |
boolean |
A debounce is waiting, or a navigation is in flight. |
request |
QubeeListRequest<TList> |
{ uri, headers, paginate } for the committed state and the input: it changes once per navigation, never per keystroke, and keeps its identity while the input stays equal, so use it as a fetching library’s cache key. null while the input is null — see QubeeListRequest. |
reset |
(options?: Omit<ListSetOptions, 'debounce'>) => void |
Return every param of the list to its default, in one navigation. Parameters the list does not own are kept; a list already at its defaults does not navigate. |
set |
(changes: Partial<ListState<TList>>, options?: ListSetOptions) => void |
Apply changes to the state and navigate — at most one navigation per call. A change to anything but the page returns to page 1; a key set to undefined returns to its default. |
setPage |
(page: number, options?: Omit<ListSetOptions, 'debounce'>) => void |
set({ page }). |
state |
ListState<TList> |
The list’s state, including changes not yet in the URL. |