Skip to content
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

Merged
merged 3 commits into from
Jul 26, 2024

Conversation

erwanMarmelab
Copy link
Contributor

@erwanMarmelab erwanMarmelab commented Jul 23, 2024

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

image

@erwanMarmelab erwanMarmelab added the RFR Ready For Review label Jul 23, 2024
@erwanMarmelab erwanMarmelab changed the title Mention CreateInDialog in ReferenceManyField doc [Documentation] Mention CreateInDialog in ReferenceManyField doc Jul 23, 2024
Copy link
Contributor Author

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 ?

Copy link
Member

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

@erwanMarmelab erwanMarmelab changed the title [Documentation] Mention CreateInDialog in ReferenceManyField doc [Doc] Mention CreateInDialog in ReferenceManyField doc Jul 23, 2024
<TextField source="last_name" />
<EditInDialogButton>
<SimpleForm
record={{ employer_id: record.id }}
Copy link
Collaborator

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

@djhi djhi merged commit c63dc76 into master Jul 26, 2024
14 checks passed
@djhi djhi deleted the doc/mention-CreateInDialog-in-ReferenceManyField-doc branch July 26, 2024 09:12
@djhi djhi modified the milestones: 5.0.6, 5.1.0 Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants