useBoardColumns
Load a board: one request per column page, each with the shared filters, sort and search plus the column's value. Columns page on their own (`loadMore`), and the pages a column has loaded reset when the filters, sort or search change.
packages/ui/src/components/data/board/use-board-columns.ts
Import
Subpath export:
@marktiderman/genesis-ui/dataimport { useBoardColumns } from "@marktiderman/genesis-ui/data";Components
Auto-generated from TypeScript source via
react-docgen-typescript.BOARD_NONE
The column for rows whose field is empty.
No declared props.
BOARD_PAGE
Cards per column page.
No declared props.
boardColumnFilter
One column's own filter: its value, or "is empty".
No declared props.
useBoardColumns
Load a board: one request per column page, each with the shared filters, sort and search plus the column's value. Columns page on their own (`loadMore`), and the pages a column has loaded reset when the filters, sort or search change.
| Prop | Type | Default | Description |
|---|---|---|---|
| field* | string | — | The field each column narrows on. |
| provider* | DataProvider | — | |
| resource* | string | — | |
| values* | readonly string[] | — | The columns, in order, as values of `field`; {@link BOARD_NONE} is the column for empty ones. |
| enabled | boolean | — | False while the screen waits (on its scope, say). Default true. |
| filters | readonly FilterParam[] | — | Filters every column shares. One on `field` itself is set aside: each column has its own. |
| getKey | ((row: BaseRecord) => string) | — | A stable key per row. With it, a row that shows on two loaded pages of a column (it moved between page reads) is drawn once. |
| perPage | number | — | Cards per column page. Default {@link BOARD_PAGE}. |
| queryKey | ((request: ListParams, column: { value: string; page: number; }) => readonly unknown[]) | — | A column page's query key. Default core's list keys (`[resource, "list", …]`), so a save to the resource refreshes the board like any list, and a write finds the row it changes in the cache. |
| retry | boolean | — | Retry failed reads (TanStack's `retry`). Default TanStack's. |
| search | { query: string; fields: string[]; } | — | |
| select | string | — | |
| sorts | readonly SortParam[] | — | |
| toValue | ((value: string) => unknown) | — | A column's value as the field stores it, for its filter: `"true"` → `true` for a yes/no field. Default: the value as given. |
BoardColumnData
One column's rows so far.
No declared props.