Genesis
@stable

NativeFieldArrayRenderer

A field of `type: "array"`: one card per item, each with the field's `arrayFields`, and Add / Remove within `arrayMin` and `arrayMax`.

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

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

NativeFieldArrayRenderer

A field of `type: "array"`: one card per item, each with the field's `arrayFields`, and Add / Remove within `arrayMin` and `arrayMax`.

PropTypeDefaultDescription
action*enum—
control*Control<Record<string, unknown>>—
field*ResourceFormFieldDef—
labels{ item?: string; remove?: string; removeButton?: string | undefined; add?: string | undefined; } | undefined{}The words. `{n}`: the item's number. `remove` is what a screen reader hears, `removeButton` the button's visible word.
watchedValuesRecord<string, unknown>—

NativeFileUploadField

A field of `type: "file"` or `"image"`: a button that opens the system picker, then the picked files with their size and a Remove each.

PropTypeDefaultDescription
field*ResourceFormFieldDef—
onChange*(value: NativePickedFile | NativePickedFile[] | null) => void—
value*NativePickedFile | NativePickedFile[] | null—
disabledboolean—
errorstring—
labels{ choose?: string; chooseMore?: string; remove?: string | undefined; noPicker?: string | undefined; pickFailed?: string | undefined; } | undefined{}The words. `pickFailed`: the picker rejected (a permission denied, a download that failed).
pickFilesGenesisFilePicker—Opens the picker. Default `GenesisModules.filePicker`.
testIDstring`file-upload-${field.key}`

NativeRelationField

A field of `type: "relation"`: the linked resource's rows through the data provider, searched and paged on the server. The same picker NativeResourceView's form uses (NativeLinkPicker), fed from the field's `relation`.

PropTypeDefaultDescription
field*ResourceFormFieldDef—
onChange*(value: string | number | null) => void—The key as the field's `relation.keys` says: a string (`""` for none), or the row's own (`null` for none).
value*unknown—
errorstring—
testIDstring`relation-${field.key}`
valuesReadonly<Record<string, unknown>>{}

NativeWizardForm

A form in steps (genesis-core's `useWizard`): the step's fields, its progress, Back and Next, and Create or Save on the last step.

PropTypeDefaultDescription
action*enum—
fields*ResourceFormFieldDef[]—
form*UseFormReturn<Record<string, unknown>>—
isSaving*boolean—
onSubmit*(data: Record<string, unknown>) => Promise<void>—
steps*WizardStep[]—
labels{ back?: string; next?: string; create?: string | undefined; save?: string | undefined; } | undefined{}
onInvalid((errors: FieldErrors) => void)—
renderField((field: ResourceFormFieldDef, control: Control<Record<string, unknown>, any, Record<string, unknown>>, action: "create" | "edit", watchedValues: Record<...>) => ReactNode)—
testIDstringwizard-form