-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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] Fix TypeScript FormHelperText.component prop #20529
[TextField] Fix TypeScript FormHelperText.component prop #20529
Conversation
Details of bundle changes.Comparing: 73a5ddd...0a9d765 Details of page changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test illustrating the issue. The component
prop comes from the overloaded function signature not the type map.
@AlexAndriyanenko You might find this prior pull request useful #20179. |
471b14b
to
30c689a
Compare
…sed to FormHelpterTextProps
30c689a
to
a150ab9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
We need a test for the correct use case as well.
@@ -48,7 +48,7 @@ export interface BaseTextFieldProps | |||
/** | |||
* Props applied to the [`FormHelperText`](/api/form-helper-text/) element. | |||
*/ | |||
FormHelperTextProps?: Partial<FormHelperTextProps>; | |||
FormHelperTextProps?: FormHelperTextProps<React.ElementType, { component: React.ElementType }>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this approach work, would it need we need to update all the other cases? For instance:
https://github.com/mui-org/material-ui/blob/b17e6856c33e96e1b6c5c5dfac327127cf4be705/packages/material-ui/src/Dialog/Dialog.d.ts#L92 once we migrate Paper to the overridable pattern? cc @eps1lon
Closing as inactive. @AlexAndriyanenko Feel free to resume the effort in the future :) |
Closes #20360