-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Doc] Mention CreateInDialog
in ReferenceManyField
doc
#10054
[Doc] Mention CreateInDialog
in ReferenceManyField
doc
#10054
Conversation
CreateInDialog
in ReferenceManyField
docCreateInDialog
in ReferenceManyField
doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want an other section with an example of <EditInDialogButton>
too ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes: you could add the button to the datagrid
CreateInDialog
in ReferenceManyField
docCreateInDialog
in ReferenceManyField
doc
docs/ReferenceManyField.md
Outdated
<TextField source="last_name" /> | ||
<EditInDialogButton> | ||
<SimpleForm | ||
record={{ employer_id: record.id }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're missing a WithRecord
here
Problem
When rendering a list of related records in a ReferenceManyField, editing and creating a related element isn’t straightforward. One can use CreateButton, but the user experience is clunky.
Solution
Add a “Adding a related record” section, showing the use of CreateInDialog button.
cf https://react-admin.github.io/ra-enterprise/?path=/story/ra-form-layout-dialogform-createindialogbutton--in-reference-field
Screenshot