You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What you were expecting:
According to the documentation examples, custom dataProvider methods should not follow the same signature as default methods, in example it's banUser: (userId) => Promise, hence I expect to be able to have any signature that is required for my needs, including functions with more than 2 parameters
What happened instead:
combineDataProviders calls dataProvider methods limiting it to 2 params: dataProviderMatcher(resource)[name](resource, params)
Steps to reproduce:
create a custom method in dataProvider
use combineDataProviders when you attach dataProvider to the admin context
call a custom method and you will get undefined on 3rd and following parameters.
Related code: Example on StackBlitz
Here in src/dataProvider.tsx I've created a new method called customMethod with 3rd parameter.
In src/Layout.tsx I call this method and I expect different console.log outputs but always get the falsy one.
What you were expecting:
According to the documentation examples, custom dataProvider methods should not follow the same signature as default methods, in example it's
banUser: (userId) => Promise
, hence I expect to be able to have any signature that is required for my needs, including functions with more than 2 parametersWhat happened instead:
combineDataProviders calls dataProvider methods limiting it to 2 params:
dataProviderMatcher(resource)[name](resource, params)
Steps to reproduce:
Related code:
Example on StackBlitz
Here in
src/dataProvider.tsx
I've created a new method called customMethod with 3rd parameter.In
src/Layout.tsx
I call this method and I expect different console.log outputs but always get the falsy one.Example of this custom method:
Environment
The text was updated successfully, but these errors were encountered: