I want to pass one custom parameter to the Admin's dataProvider for type 'GET_LIST'.
I have something like this in App.js:
<Admin dataProvider={dataProvider}>
<Resource name="posts" list={PostList} myCustomAttr={"10"} />
<Resource name="users" list={UserList} myCustomAttr={"15"} />
</Admin>
And 'dataProvider' is a custom dataProvider and I want to have the 'myCustomAttr' when it gets called.
So my custom dataProvider could look like this:
export default (type, resource, params) => {
if (type == 'GET_LIST') {
if (params.myCustomAttr == '10') {
//Do something
}
}
}