interface
FieldBinding
Read and update one field in the unsaved form, including validation messages and live feedback.
Properties and methods
| Property | Type | Description |
|---|---|---|
schema | SchemaField & | A copy of the resolved field definition, including its current path, label and rules.
schema.admin.readOnly reflects field configuration and access, not a pending document save. |
value | FieldEditorValue< | Current form value, including unsaved edits; null/undefined mean empty or absent. |
issues | readonly ValidationIssue[] | Current validation issues, including errors returned by a document save. |
liveValidation | FieldLiveValidation | Read the check’s status or call retry() after a failure. Ridu runs the requests; messages appear alongside other validation issues in field.issues. |
readOnly | boolean | Whether changes are blocked right now, including during a document save. set checks this again when called. |
stale | boolean | True once the connection expires. Value becomes undefined, issues empty and writes throw. |
inputProps | { id: string; name: string; required: boolean; "aria-invalid": boolean; "aria-describedby": string | | ID, name and accessibility attributes for your input. Spread these onto the
control, and handle field.readOnly and value changes separately.
The optional Field wrapper supplies the matching label and error messages.
Native required is false for boolean and list controls: a list requires
entries, not nonempty text in every item. Ridu validates the container on save. |
set | (value: FieldEditorValue< | Change the value in the unsaved form; null clears it. This does not save to
the server. Throws if stale, read-only, or given the wrong value type. Lists are copied on reads and writes.
Normal field validation and server authorization still apply on document save. |
How it works
Ridu creates and cleans up this field connection. For arrays and blocks, it follows the row’s stable _key through reorder. Removing the field or replacing the form makes the connection stale; use the binding supplied to the newly mounted editor.
Full signature
interface FieldBinding<Type extends FieldEditorType = FieldEditorType> { ... }Methods
FieldBinding.set()Change the value in the unsaved form;
nullclears it. This does not save to the server. Throws if stale, read-only, or given the wrong value type. Lists are copied on reads and writes. Normal field validation and server authorization still apply on document save.