diff --git a/docs/ReferenceManyField.md b/docs/ReferenceManyField.md index 832edb923d6..67e512ca313 100644 --- a/docs/ReferenceManyField.md +++ b/docs/ReferenceManyField.md @@ -346,3 +346,57 @@ In these cases, use [the `` component](./ReferenceOneField.md ``` {% endraw %} + +## Adding or editing a related record + +To allow users to create or edit a record without leaving the current view, use the [``](./CreateInDialogButton.md) or the [``](./EditInDialogButton.md) component. + +{% raw %} +```jsx +import { Edit, SimpleForm, TextInput, ReferenceManyField, WithRecord, Datagrid } from 'react-admin'; +import { CreateInDialogButton, EditInDialogButton } from "@react-admin/ra-form-layout"; + +const EmployerEdit = () => ( + + + + + + + ( + + + + + + + )} + /> + + + + ( + + + + + + + )} + /> + + + + +) +``` +{% endraw %}