When i just created the TabbedForm with references it doesnt actually displays the content of ReferenceManyField control because of crushing on error.
You are trying to display or edit a field of a resource called "whatever", but it has not been declared.
Declare this resource in the Admin or check the 'reference' prop of ReferenceArrayField and ReferenceManyField.
But i dont need it to be declared as resource (overage work in my case). I better prefer to add and edit those reference records inside the model's form they reference onto as item collection (but this is offtop already =D).
You can reproduce it on demo app https://codesandbox.io/s/w6r3x5nk6k, just go into the edit mode on the Features tab, then look in console output.
I am not one of developer team but i can give you some answers.
It seems like your sandbox is not working (VacancyCreate is missing) can you check it please.
It's written in the documentation that you need to do so. You only need to add <Resource name="YOUR_RESSOURCE_NAME" /> Nothing more.
Note: You must add a
for the reference resource - react-admin needs it to fetch the reference data. You can omit the list prop in this reference if you want to hide it in the sidebar menu. <Admin dataProvider={myDataProvider}> <Resource name="comments" list={CommentList} /> <Resource name="posts" /> </Admin>https://github.com/marmelab/react-admin/blob/master/docs/Fields.md#referencefield
If you want to understand why you can look into the code of ReferenceManyField Controller (https://github.com/marmelab/react-admin/blob/master/packages/ra-core/src/controller/field/ReferenceManyFieldController.js) and you will find (if i am not wrong) that RA calculate possibles values of the references by using crudGetManyReference which do a GET request and save the result in the redux state like other defined ressources. And everything is computed from this state.
So to have a well structured state to handle these requests, you need to define the resource, which is not an overage work ;)
It doesnt save all my changes for some reason...
try this one https://codesandbox.io/s/zlx6ynq8vm .
Thank you for answer anyway, it more clear now. But this still is looks a bit strange to me, because i can see that actually request and response (with all needed data from server) happen before application checks any resources inside <Admin>.
I edited the sandbox to make it work :
https://codesandbox.io/s/mo9z7yw97j
i added Ressource vacancy_features inside <Admin>
I added ReactDOM.render(<Application />, document.getElementById("root")); to render your Application.
I don't really understand this point : you mean that the ressource "vacancy_features" is fetched no matter if the relative ressource is defined in
Here is my understanding of how it works
So if you don't define the Ressource properly, you are blocked after step 2 because there is no right place defined for this ressource. That's why you see the data request but no rendering.
Closing this is as this is not an issue. This should be discussed on StackOverflow as specified in the issue templates. Thanks @PhenixH :)
Most helpful comment
I edited the sandbox to make it work :
https://codesandbox.io/s/mo9z7yw97j
i added Ressource
vacancy_featuresinside<Admin>I added
ReactDOM.render(<Application />, document.getElementById("root"));to render your Application.I don't really understand this point : you mean that the ressource "vacancy_features" is fetched no matter if the relative ressource is defined in or not ? If it's what you mean, it's normal:
Here is my understanding of how it works
So if you don't define the Ressource properly, you are blocked after step 2 because there is no right place defined for this ressource. That's why you see the data request but no rendering.