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

4.12.1 Invalid Type Warning on DataGrid / XGrid #2142

Closed
2 tasks done
jonathanstanley opened this issue Jul 13, 2021 · 1 comment
Closed
2 tasks done

4.12.1 Invalid Type Warning on DataGrid / XGrid #2142

jonathanstanley opened this issue Jul 13, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@jonathanstanley
Copy link

jonathanstanley commented Jul 13, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

console throws warning in both DataGrid and XGrid:

Warning: Failed prop type: Invalid prop `modifiers` of type `array` supplied to `ForwardRef(Popper)`, expected `object`.

This error only in DataGrid:

Material-UI: The key `selectLabel` provided to the classes prop is not implemented in ForwardRef(TablePagination).

Expected Behavior 🤔

Probably no warning. The error does not appear in v5.

Steps to Reproduce 🕹

see console: https://codesandbox.io/s/hungry-boyd-d4x63
very simple DataGrid and XGrid

Context 🔦

This appears to be caused by this code: https://github.com/mui-org/material-ui-x/blob/b88f9ef7730b2de97de7fdbd1e9e1ff2b7405fce/packages/grid/_modules_/grid/components/panel/GridPanel.tsx#L53-L60 added from pull #855 (the old version doesn't take this array, so this checker is trying to determine old/new version). a few other places also rely on the isMuiV5 checker.

But the checker may not be making the right call because it is just relying on the alpha property
https://github.com/mui-org/material-ui-x/blob/ef14e9ee8fde442576ba32279ad7a625dc99c4d2/packages/grid/_modules_/grid/utils/utils.ts#L24-L26
alpha preemptively added to v4.12.0 to help people transition (see mui/material-ui#22837)

Your Environment 🌎

see codesandbox

@oliviertassinari oliviertassinari transferred this issue from mui/material-ui Jul 13, 2021
@oliviertassinari oliviertassinari added duplicate This issue or pull request already exists status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 13, 2021
@oliviertassinari
Copy link
Member

Duplicate of #2106

@oliviertassinari oliviertassinari marked this as a duplicate of #2106 Jul 15, 2021
@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants