Genesis
@beta

ResourceViewDefaultsProvider

Set list defaults for the whole app, once, near the root: ```tsx <ResourceViewDefaultsProvider phoneMode="grid" clipCells sizeColumns pagerJumps savedViews={store} urlState={useTanStackRouterSearchParams()} rowActions> <App /> </ResourceViewDefaultsProvider> ``` Nested providers build on each other: an unset key inherits, and `phoneMode={null}` or `false` for the others turns the outer one off below it.

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

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

ResourceViewDefaultsProvider

Set list defaults for the whole app, once, near the root: ```tsx <ResourceViewDefaultsProvider phoneMode="grid" clipCells sizeColumns pagerJumps savedViews={store} urlState={useTanStackRouterSearchParams()} rowActions> <App /> </ResourceViewDefaultsProvider> ``` Nested providers build on each other: an unset key inherits, and `phoneMode={null}` or `false` for the others turns the outer one off below it.

PropTypeDefaultDescription
clipCellsboolean—Clip each table cell's content at its column's edge (one line, with an ellipsis for text), so a long link or email doesn't run over the next column on a narrow table. Inline editors are never clipped. Unset, cells draw as before; `false` turns an outer provider's off.
pagerJumpsboolean—Pagers with first and last page buttons, "Page n of m" in the table's own pager, and "Previous page" / "Next page" as the arrows' names (ResourcePage and DataTable `pagerJumps`). Unset, pagers draw as before; `false` turns an outer provider's off.
phoneMode"grid" | "list" | null—How a list opens while it is narrow (its own frame below 40rem, `LIST_NARROW_REM`) when the screen doesn't say: `grid` (cards) or `list` (rows). Wider, it keeps the table. Page and embedded lists alike; compact lists are rows already. Unset, lists open as a table everywhere, as before; `null` turns an outer provider's default off for this subtree.
rowActionsboolean—Draw a view's actions in its lists (ADR 0017 §2): a "More" menu on each row (edit, the view's actions, delete) and the same on right-click, refusals shown with their reasons. Off by default for this minor; a screen's `rowActions` wins.
savedViewsSavedViewStore | null—Where saved views live (ADR 0017 §4): a `SavedViewStore` (`list`, `save`, `remove`, personal or team). With one, page lists offer "Views" (save, load, delete), stamped with each view's `version`, and each person's choices (their view type) go through it too. Genesis ships a device store (`createLocalSavedViewStore`); an app supplies a server one over its own table. Unset, no saved views, and the view type is remembered on this device. `null` turns an outer provider's off.
sizeColumnsboolean—Size each table column by what it shows: the record's name column takes the spare width, the others a width for their display (a badge, a number, a date), and the table keeps room for every column, scrolling sideways below that (DataTable `minWidth="auto"`). Unset, columns share the width equally, as before; `false` turns an outer provider's off.
urlStateSearchParamsAdapter | null—The router's search-params adapter (`useTanStackRouterSearchParams()`, `useReactRouterSearchParams()`, `useBrowserSearchParams()`), registered once: every page list (`layout="page"`) keeps its segment (`seg`), declared filters (`f.<field>`), search, sort and page in the URL. Embedded lists stay out unless they pass `urlState`; a screen's `urlState={false}` opts out. `null` turns an outer provider's off.

useResourceViewDefaults

The list defaults in effect (empty without a provider).

No declared props.