-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
[DataGrid] Fix support for @material-ui/core@4.12
#2108
[DataGrid] Fix support for @material-ui/core@4.12
#2108
Conversation
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.
"Update isMuiV5 helper" assuming what we go after is "Fix support for @material-ui/core@4.12", we also need to update muiStyleAlpha
and createTheme
to remove the deprecation warnings. We can no longer test the version, we need to feature detect.
@oliviertassinari Yes, I had a quick chat with @mnajdova this morning about it that was the easiest solution to the problem.
The drawback with doing that is that we need to also update the core version we support. Basically to use the grid one will need to use core@4.12.0 > , no ? |
No need to change the support version, we can use feature detection. |
isMuiV5
helper@material-ui/core@4.12
The tests are failing because of depreciation warnings. Basically now we need a way to know if it is v4.12 because I don't see how we can detect things like |
@DanailH Arf, maybe we should do what you have proposed initially then, drop <v4.12 versions support? I can't think of any way to know if we are on v4.12 or v4.11. Maybe someone else will. |
c0961c1
to
5e702eb
Compare
I have fixed the build, as turns out, we could easily detect v4.12.1
} | ||
|
||
export function muiStyleAlpha(color: string, value: number): string { | ||
if (isMuiV5()) { | ||
if ((styles as any)?.alpha) { |
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.
A good take away for us: feature detection >> version matching.
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
65432b8
to
4cf8a7b
Compare
any chance there will be a release soon that has this fix incorporated? We are running into:
because of this one. TIA. |
Same here + I still have errors:
I tried downgrade back of Current package.json:
Thank you @oliviertassinari |
seems to have resolved the issue |
but you are using |
@striky1 He's a Pro plan user. This fix was released in MUI X version: 4.0.0-alpha.34, regardless of the plan (MIT or commercial). |
Fixes #2106
A full explanation of the problem can be found here -> #2106 (comment)