mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.16k stars 1.3k forks source link

[question] Uncaught Error: Maximum update depth exceeded after any interaction with a DataGridPremium table #15111

Open KseniaKoms opened 3 hours ago

KseniaKoms commented 3 hours ago

The problem in depth

After updating DataDridPremium from 7.16.0 to 7.21.0 we have problem with updating component state: 'Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops'.

This error occurs after any interaction with table that triggers updating rowGroupingModel, rowSelectionModel and others table states cause to this error.

Your environment

System:
    OS: macOS 15.0.1
  Binaries:
    Node: 21.6.2 - /opt/homebrew/bin/node
    npm: 10.2.4 - /opt/homebrew/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 130.0.6723.70
    Edge: Not Found
    Safari: 18.0.1
  npmPackages:
    @emotion/react: ^11.11.4 => 11.11.4 
    @emotion/styled: ^11.11.0 => 11.11.0 
    @mui/base:  5.0.0-beta.36 
    @mui/core-downloads-tracker:  5.15.10 
    @mui/icons-material: ^5.16.7 => 5.16.7 
    @mui/material: ^5.15.0 => 5.15.10 
    @mui/private-theming:  6.0.2 
    @mui/styled-engine:  6.0.2 
    @mui/system: ^6.0.2 => 6.0.2 
    @mui/types:  7.2.18 
    @mui/utils:  6.1.5 
    @mui/x-data-grid:  7.21.0 
    @mui/x-data-grid-premium: ^7.21.0 => 7.21.0 
    @mui/x-data-grid-pro:  7.21.0 
    @mui/x-date-pickers: 6.18.4 => 6.18.4 
    @mui/x-internals:  7.21.0 
    @mui/x-license:  7.21.0 
    @types/react: 18.2.48 => 18.2.48 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    typescript: 5.0.3 => 5.0.3

Search keywords: DataGridPremium update state Order ID: 82865

KenanYusuf commented 2 hours ago

Hi @KseniaKoms, please can you provide a reproduction in CodeSandbox or StackBlitz? You can fork a demo from the docs to speed things up.