Genesis
@beta

ResourceBoard

A view's rows as a board. Prefer `<ResourceView view={v} mode="board" />`, which passes the scope and the screen's filters.

packages/ui/src/components/data/resource-view/ResourceBoard.tsx

Import
Subpath export: @marktiderman/genesis-ui/data
import { ResourceBoard } from "@marktiderman/genesis-ui/data";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

ResourceBoard

A view's rows as a board. Prefer `<ResourceView view={v} mode="board" />`, which passes the scope and the screen's filters.

PropTypeDefaultDescription
view*ResourceView<ResourceContract<any>, T & DataRow>—
can((action: ResourceAction, item?: T) => boolean)—The screen's own guard (ResourceView's `can`): it only narrows the view's. A card moves only when both allow `edit` for its row.
cardFieldsreadonly string[]—The fields a card shows under its title, in order. Default none: the title alone.
cellsPartial<Record<string, (row: T) => ReactNode>>—Draw some card and peek fields the screen's own way, by key (ResourceView's `cells`).
classNamestring—
columnsreadonly string[]—The columns, in order, as values of `field`. Default: its choices in the contract's order, then a "No value" column when it can be empty. Listing them shows only those.
enabledboolean—False while the screen waits (on its scope, say): nothing is fetched. Default true.
fieldstring—The field whose value is a card's column: a field with choices (an enum) or a yes/no one.
filtersreadonly FilterParam[]—Server filters (the view's scope and the screen's), already as params.
limitsReadonly<Record<string, number>>—The most cards a column should hold, by value (`{ doing: 3 }`): a work-in-progress limit. A column over its limit says so; nothing stops a move into it.
liveboolean | LiveOptions—
onMoveError((error: unknown, row: T) => void)—A move was refused (a guard, the server, a conflict with someone else's edit). The card is already back where it was. Default: the reason shows above the board.
onNavigateNavigateFn—With `open="page"`: how to go to the record's page. Default a full-page navigation.
onSelect((row: T) => void)—A card was chosen. Default: the view's peek.
openenum—How a card opens (ADR 0021): `side-peek`, `center-peek` or `page` (navigates to `/{resource}/{id}` through `onNavigate`), or `none`. Default the view's `open`, else a side peek.
perPagenumber—Cards per column page. Default 50.
recordViewRecordView<ResourceContract<any>, any>—The record view a peek draws. Default the view's `recordView`, else the view's columns.
renderCard((row: T) => ReactNode)—Draw a card this screen's way. Default: the row's title and the board's `cardFields`.
resourceOptionsPick<UseResourceOptions<T & BaseRecord>, "invalidates" | "onError" | "onUpdateSuccess">—The list's write options (ResourceView's `resourceOptions`): `invalidates`, `onError` and `onUpdateSuccess` apply to a move. A move is always pessimistic, so `mutationMode` is ignored.
selectstring—
subtitlestring—
testIDstring—
titlestring—
Storybook
Storybook hosts the canonical visual reference with controls for every variant.