-
-
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
[material-ui][Select] SelectProps suddenly break by making variant required #41356
Comments
Hey @maapteh, thanks for the report. Also reported here: #39137 (comment) I'll look into it this week |
Thank you, i looked but search didnt find anything. I will see if making them optional again will fix my issue.
This was helpful but not fixing the root cause:) |
I created a fix in the PR attached to this issue report! |
Please look at it @DiegoAndai when you find the time :) |
Hey @maapteh, may I ask you to provide a minimal reproduction? This would help a lot in debugging the issue. A live example would be perfect. This StackBlitz sandbox template may be a good starting point. |
I solved it in #41359 right? |
I'm not sure, I left a comment there |
Ah now i see, but its a union type so i dont see how that would work... |
I created a typescript playground with all the problems I could find, including this one:
|
I'll add the |
Steps to reproduce
In the latest version this PR https://github.com/mui/material-ui/pull/39137/files breaks the contract by suddenly making the
variant
prop a required one instead of the previous optional. This is not handy when extending on MUI components where the variant in the base props was optional.Current behavior
Suddenly getting type errors when doing a patch update of MUI, it should not break
Expected behavior
Not give compilation errors on components extending MUI Select
Context
When updating from 5.15.7 to 5.15.11 suddenly this error
I can omit the field, but i rather would like MUI to stick to its Base Input Props where variant is typed as optional.
Your environment
[5.15.7 -> 5.15.11] (https://renovatebot.com/diffs/npm/@mui%2fmaterial/5.15.7/5.15.11)
Search keywords: SelectProps variant
The text was updated successfully, but these errors were encountered: