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
Shouldn't this line be const resource = res || useResourceContext(props); with const {resource: res, ...otherProps} = props instead? Since on line 109 there is still a check for 'resource' as a required props in ListControllerProps.
My Problem: I tried to render resource Y inside a Modal when I am currently at resource X and this one breaks the ListView since it returns data from X instead of Y. It works fine on v3.8 but breaks after updated to v3.10.
The text was updated successfully, but these errors were encountered:
Actually, the resource should be removed from the useCheckMinimumRequiredProps. Indeed the reason we pass the props the useResourceContext is to fallback to the resource prop until we release version 4. Would you mind opening a pr to fix it ?
As for your usecase, you may pass the resource prop for now but will probably need to wrap your List with a ResourceContextProvider later
react-admin/packages/ra-core/src/controller/useListController.ts
Line 121 in 12a40fb
Shouldn't this line be
const resource = res || useResourceContext(props);
withconst {resource: res, ...otherProps} = props
instead? Since on line 109 there is still a check for 'resource' as a required props in ListControllerProps.react-admin/packages/ra-core/src/controller/useListController.ts
Line 109 in 12a40fb
My Problem: I tried to render resource Y inside a Modal when I am currently at resource X and this one breaks the ListView since it returns data from X instead of Y. It works fine on v3.8 but breaks after updated to v3.10.
The text was updated successfully, but these errors were encountered: