-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Typescript: MenuItem missing "component" prop #33710
Comments
This is also an issue for |
I just did some testing with this, and it works if I forcefully ignore the typing by spreading the props
So it seems like this is just a issue with the Typescript declarations. |
I can do a quick fix for this - the prop spread works but it's always nicer to have the types in place. |
I don't understand what is the issue, it works as expected - https://codesandbox.io/s/young-cache-pu312y?file=/src/App.tsx |
Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information. |
Duplicates
Latest version
Current behavior 😯
The MenuItem is missing the "component" prop in Typescript, in
@mui/material
v5.9.2
. It has theLinkComponent
prop, but that seems to do something different.It looks like this was an issue in MUI 4, but that was closed as fixed: #14970
Expected behavior 🤔
component should be able to be provided, so I can use a react-router-dom Link and give MenuItem a
to
prop. It says it exists in the documentationSteps to reproduce 🕹
No response
Context 🔦
Trying to make it so MenuItem is a react-router-dom link (specifically a RouterLink). If there's another way to accomplish this, let me know!
Your environment 🌎
npx @mui/envinfo
tsconfig.json
The text was updated successfully, but these errors were encountered: