-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
What you were expecting:
The error component props typing should match exactly as docs
What happened instead:
After some review I found out they are not exactly the same.
The error component for Admin and Layout receives different arguments, but the docs are not very clear.
The error component on layout https://marmelab.com/react-admin/Layout.html#error says I will receive resetErrorBoundary but the user passed in error component did not receive such prop https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/layout/Error.tsx#L47
The typescript ErrorProps also only picks "error" from react-error-boundry FallbackProps, but not the resetErrorBoundary https://github.com/marmelab/react-admin/blob/master/packages/ra-ui-materialui/src/layout/Error.tsx#L137
We should standardize these components. The ErrorProps interface on Admin component is also not published
Environment
- React-admin version: 5.6.3
- Last version that did not exhibit the issue (if applicable): N/A
- React version: 19.0.0
- Browser: Safari
- Stack trace (in case of a JS error):