-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[TextField] FormHelperTextProps component
prop error in TypeScript
#33339
Comments
Seems to be related to this: And maybe more. Looks like there's no workaround other than |
component
prop error in TypeScript
any updates on this? |
@auduongtuan There is a fix provided in #35924. |
It doesn't really fix the issue. The Updated the codesandbox of @robcaldecott here: https://codesandbox.io/s/rough-tree-cxvcgc |
@JanPretzel this will be fixed in #38084 |
I think this might be back in 5.14.3 |
The issue is solved for the standard component prop on a mui component. However, its still a regression for Let me know if a new issue would help. See updated sandbox - https://codesandbox.io/s/nifty-paper-gqcq77?file=/src/App.tsx |
Duplicates
Latest version
Current behavior 😯
I am trying to replace the
FormHelperText
component used by aTextField
with my own variant but am getting a TS error when attempting to override thecomponent
prop. Here is the code:The full TS error is:
The code works and I get my fancy helper text replacement but I cannot fix the TS error.
Expected behavior 🤔
I would expect to be able to override the
component
prop ofFormHelperTextProps
to replace the implemenation.The MUI docs state:
https://mui.com/material-ui/api/form-helper-text/#props
Steps to reproduce 🕹
https://codesandbox.io/s/upbeat-lamarr-z7f72d?file=/src/App.tsx
Context 🔦
I want to customise the component used to render
TextField
helperText
.Maybe there is another way to do this without incurring the wrath of TypeScript?
Your environment 🌎
@mui/material 5.8.4
The text was updated successfully, but these errors were encountered: