method
EmbeddedSchemaFormProps.onChange
Record a child-field edit in the plugin editor's history and serialized value.
Example
function recordEmbeddedEdit(
identity: string,
commit: (identity: string, payload: Record<string, unknown>) => void
) {
return (payload: Record<string, unknown>) =>
commit(identity, payload);
}Arguments
| Argument | Type | Description |
|---|---|---|
payload | Record< | Detached current ordinary field data for this embedded item after the edit. |
Returns
No return value. Update the latest matching item through your editor.
voidHow it works
Ridu calls this callback only when an ordinary field inside the specified item changes. Initial rendering, sibling edits, and a write of the whole plugin value do not call it. Ridu updates the unsaved parent form; your editor must record its own history and serialize its value.
Full signature
EmbeddedSchemaFormProps.onChange(payload: Record<string, unknown>): void