-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
ReferenceField not using custom data provider #504
Comments
I have the same problem. The ReferenceField is not using my custom data provider like any othe component and hook. |
This has been an issue since 2020. Is anybody using this whole api-platform admin stuff? How do people make anything usable with this library when basic features are buggy? |
For anyone who endup here from google search.
dataProvider:
|
Description
I've extended the Hydra data provider to add authenticatino headers.
My dataprovider adds auth headers to ALL api calls. I need to use supabase auth headers for the API authentication.
This works fine for all show/edit pages etc.
I'm expecting all components to use this data provider.
But when using ReferenceField in either show or create/edit pages, these custom headers are not passed to the calls.
After doing some debuggin with console.logs, it appears that this component does not even call the custom dataprovider, but the built in data provider. Therefore, all these components cause request errors because the API returns 401. The data does appear, so it seems to be doing multiple API calls. One with the custom data provider, and one without.
After checking with the ReactAdmin team, it turns out this is probably related to the default Hydra Data Provider.
Can this be checked?
Reference: marmelab/react-admin#8883
The text was updated successfully, but these errors were encountered: