Skip to main content

SchemaEdit

Renders the edit form of an existing record from its schema and submits the changes.

A resource gets this view automatically. Mount it explicitly to intercept the submit, add form actions, or replace the generated form.

Example​

<SchemaResource
name="eshop/product"
edit={
<SchemaEdit
formActions={<><SchemaFormActions /><SaveAndContinueButton /></>}
/>
}
/>

Props​

On top of these it accepts React Admin's EditProps except children.

NameTypeDefaultDescription
namestring'edit'Which edit view of the schema to render
childrenReactNodegenerated formReplaces the generated inputs
onSubmitSubmitHandler<FieldValues>default update callTakes over submitting entirely
onPostSubmit() => void—Runs after a successful save
titleReactNode<SchemaViewTitle />Card header
toolbarActionsReactNode<SchemaViewToolbarActions />Buttons next to the title
formActionsReactNode<SchemaFormActions />Buttons in the form toolbar; defaults to a save button

The slots are described in detail on View slots.

Read-only fields​

A field the schema marks readOnly is rendered by the field components, not the inputs — the value is visible but not editable, and it is not submitted. This is how per-record permissions reach the form: the backend can return the same view with a different set of read-only fields depending on who is asking.

tip

draftEnabled on SchemaAdmin keeps unsaved changes locally and offers them back the next time the same record is opened — useful for long forms where a lost tab costs real work.

See also​