-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
react admin error with Menu.Item missing properties #9737
Comments
Thanks for your report. I can somehow reproduce it in the simple example (https://stackblitz.com/edit/github-1ymznm?file=src%2FLayout.tsx), but not in the monorepo. There must be a regression somewhere in one of the dependencies. |
The two missing props seem to be |
The problem comes from
|
This is indeed a problem with DefinitelyTyped: DefinitelyTyped/DefinitelyTyped#69006 The fix has been merged and should be released soon: DefinitelyTyped/DefinitelyTyped#69005 In the meantime, please limit the |
I think this is not enough, as it only reverts the type removal for v16 and v17 but does not changes anything about v18: The error still appears with the latest v18.2.70 released today. Is this solved with the next bugfix release of react-admin v4? Or will it only work with react-admin v5, which includes the react v18 update? |
react-admin can't fix this regression, as it comes from DefinitelyTyped. I suggest you downgrade to 18.2.65, and report the fact that the bug is still present in the DefinitelyTyped repo. |
The problem seems to be still present in |
@fzaninotto , unfortunately it looks like there was a "fix" that was subsequently abandoned. Given that, and the attitude of the devs working on the |
@AntonOfTheWoods Can you elaborate on the attitude of the devs? Also, what would you want to "remove"? |
So accoding to DefinitelyTyped/DefinitelyTyped#69243 (review), the React types won't be updated for React 18, so we need to fix it in react-admin. |
I can't reproduce the problem anymore with React 18 (in react-admin branch If you still have the bug, can you give a repro? Note that React 18 isn't officially supported by react-admin v4. |
@fzaninotto Fix in react-admin
It's not only MenuLinkItem affected, same behavior with InspectorButton for example |
Apologies, my mind is confused by switching back and forth between versions. You're right, react-admin v4, the current version, does support React 18. So we need to fix this issue in the The fact that the issue is (apparently) already fixed in the |
I am willing to help, yet i'm not sure what the fix would be. At least i'll confirm it will resolve) Also, |
It would be a great gelp if you could list here the components that trigger the compilation error. |
I've looked up by
As I see, |
…junk props. According to issue marmelab#9737
#9853 works @fzaninotto |
I got an error when using the component Menu.Item of react admin. It seems that all the properties are missing.
Therefore I can't build my app without adding all the 250+ properties of Menu.Item. I noticed that it works when using the component MenuItemLink.
You can reproduce it by using the documentation example of Menu.Item. I am using node version v21.6.1 and npm version 10.2.4
it does not build with the code:
it seems related to this issue: #1196 that has already been resolved but adding @types/react-router and @types/react-router-dom did not solve the problem.
The text was updated successfully, but these errors were encountered: