-
-
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
ReferenceManyField breaks when wrapped in simple layout components #4156
Comments
|
@fzaninotto I guess you mean SimpleForm expects Inputs or Fields as children, since the RA site contains examples with ReferenceManyField as a child of SimpleForm. |
For anyone else who might run into this issue, I seem to be having luck with wrapping things in |
What you were expecting:
I can wrap a
ReferenceManyField
component inside layout components such asdiv
or Material UIGrid
and it will continue to work.What happened instead:
React Admin displays the "Something went wrong" page and the details show:
TypeError: Cannot read property 'replace' of undefined
...
Steps to reproduce:
View the codesandbox: https://codesandbox.io/s/gallant-rain-jbuu6
Select an animal from the list to go to the edit form. Everything displays OK.
Now open the
animal.js
file and uncomment thediv
tags on lines 39 and 54, surrounding the ReferenceManyField component, and save the file. Then the page displays the error I describe. Codesandbox has a bug that prevents it from showing the actual error. You can run the example locally to see it.Related code:
https://codesandbox.io/s/gallant-rain-jbuu6
Environment
The text was updated successfully, but these errors were encountered: