Genesis
@stable

NativeCustomView

packages/ui-native/src/data/NativeCustomView.tsx

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

useNativeCustomView

A native custom view's data and states, headless. `<NativeCustomView>` calls it and draws the states.

No declared props.

NativeCustomView

PropTypeDefaultDescription
children*(state: NativeCustomViewState<T>) => ReactNode—Draws the view once there's something to show.
view*AnyResourceView<T>—
canNativeResourceScreenCan<T>—The screen's own rule. It only narrows the view's guards.
emptyReactNode—Replaces the empty state; `false` hands an empty view to `children` too.
enabledboolean—False while another type (a board, a calendar) draws the rows: the list reads nothing. Default true.
errorReactNode | ((error: string, retry: () => void) => ReactNode)—Replaces the error state; a function gets the error and a retry.
filterReadonly<Record<string, string | number | boolean | readonly (string | number)[] | null>>—Filters sent to the server (`{ client_id: id }`); `null` means "is empty" and a list means "any of" (`{ status: ["open", "blocked"] }`, sent as `in`; a create never takes a list). A create also saves every non-null value here (a tab's filter too), even for read-only fields such as a required link: they come from the screen, never from an input. An edit never sends them.
listFiltersreadonly FilterParam[]—The list state's filters (core `useListState`: a segment and the declared filters), on top of the screen's.
liveboolean—Refetch loaded pages when the provider reports a change.
loadingReactNode—
maxPagesnumber—Pages kept loaded when the provider pages by cursor (and serves `prevCursor`): scrolling far drops pages from the front, and scrolling back to the top loads them again (`loadPrevious` on the list's `onStartReached`, with `maintainVisibleContentPosition` so the rows on screen stay put). Offset paging never drops pages. Default 10.
perPagenumber—Rows per page. Default 25.
presetstring—A tab the view defines: its server filter.
searchFieldsstring[]—Fields the search box searches. Default: the view's `labelField`.
testIDstringcustom-view