Skip to content
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] Broken support of core v4.12.1 #2106

Closed
NielsRavn opened this issue Jul 9, 2021 · 7 comments · Fixed by #2108
Closed

[DataGrid] Broken support of core v4.12.1 #2106

NielsRavn opened this issue Jul 9, 2021 · 7 comments · Fixed by #2108
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! priority: important This change can make a difference

Comments

@NielsRavn
Copy link

in data-grid version 4.0.0-alpha.33, i cannot build my typescript project because the data-grid.d.ts:519 references Localization$1['components'] in @material-ui/core/localization, which does not exist.
I have tried with the listed version @material-ui/core@4.9.12 and the latest version @material-ui/core@4.12.1.
The problem is also in version 4.0.0-alpha.32 but not present in 4.0.0-alpha.31 as it does not reference the localization of material ui.

The error message:
Property 'components' does not exist on type 'Localization'.

Maybe it is meant to be only for material-ui@5.0.0? i havent tried with that, as it is not tagged as the latest version yet.

@DanailH DanailH added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! labels Jul 9, 2021
@DanailH
Copy link
Member

DanailH commented Jul 9, 2021

@NielsRavn thanks for raising this. There seems to be a problem with the way we detect if the user @material-ui/core is v5 or v4. The DataGrid localizations are built for v5 even though the used version is v4.


After a quick investigation, the problem seems to be coming out of the @material-ui/core and more specifically version 4.12.0. Before that version the isMuiV5 helper we use in mui-x works as expected.

So a quick solution would be to go back to @material-ui/core@4.11.4 or directly to @material-ui/core@5.0.0-beta.0.

You can check how changing the version of the core behaves here https://codesandbox.io/s/material-demo-forked-44w4z?file=/demo.js

This is the problematic part -> https://github.com/mui-org/material-ui/pull/22837/files#diff-6cbc65d66b330740baa9ae285cbaca3eb3cb0ec24e6de630887ad1830e7f9fa8

@ddolcimascolo
Copy link

Hey guys,

Upgrading core to 4.12 has also started raising quite a lot of warnings in our test suites. Specifically tons of Material-UI: The key selectLabel provided to the classes prop is not implemented in ForwardRef(TablePagination)

Is this the same issue?

Thanks,
David

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 10, 2021

@ddolcimascolo Yes, same issue.

@oliviertassinari oliviertassinari changed the title [DataGrid] localization build error [DataGrid] Broken support or v4.12.1 Jul 10, 2021
@oliviertassinari oliviertassinari changed the title [DataGrid] Broken support or v4.12.1 [DataGrid] Broken support of v4.12.1 Jul 10, 2021
@oliviertassinari oliviertassinari changed the title [DataGrid] Broken support of v4.12.1 [DataGrid] Broken support of core v4.12.1 Jul 10, 2021
@oliviertassinari oliviertassinari added the priority: important This change can make a difference label Jul 10, 2021
@ddolcimascolo
Copy link

Guys, any news on this ?

@Delapouite
Copy link

Thanks @DanailH for your hints.

At first, I struggled understanding why the change you mention https://github.com/mui-org/material-ui/pull/22837/files#diff-6cbc65d66b330740baa9ae285cbaca3eb3cb0ec24e6de630887ad1830e7f9fa8 which is about the switch from fadealpha was related to the topic.

But then I had a look at the guard you also mention :

export function isMuiV5(): boolean {
  return 'alpha' in styles;
}

And now it makes sense.

@m4theushw

This comment has been minimized.

@oliviertassinari
Copy link
Member

I also take care of it in #2117.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! priority: important This change can make a difference
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants