method

EmbeddedSchemaFormProps.onChange

Record a child-field edit in the plugin editor's history and serialized value.

Example

ts
function recordEmbeddedEdit(
  identity: string,
  commit: (identity: string, payload: Record<string, unknown>) => void
) {
  return (payload: Record<string, unknown>) =>
    commit(identity, payload);
}

Arguments

ArgumentTypeDescription
payloadRecord<string, unknown>Detached current ordinary field data for this embedded item after the edit.

Returns

No return value. Update the latest matching item through your editor.

void

How 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

Related guides