Skip to content

[data grid] Removing column with turned on aggregation leads to crash #16091

@rettoua

Description

@rettoua

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/dazzling-jasper-9h3xhf
  2. After the grid is shown, change the comment or add a new one in the source code: it's important to make any changes in the source file
  3. Press Remove Gross Column button

Current behavior

After removing the column from the datagrid following error in thrown:
image

Expected behavior

No error

Context

In my project, this error occurs without the need to modify the source code – simply removing a column causes a crash. I couldn’t reproduce it in the sandbox, as the datagrid in my project is highly customized.
The issue started occurring after updating @mui/x-data-grid-premium to version 7.23. Version 7.22 works fine.

Two places can 'help' to fix the error:

  1. Removing groupingValueGetter eliminates error
    image
  2. Changing rows (just new array would be enough) also eliminates error
    image

I suppose there is probably a problem with the cache in the internals of the Datagrid.

Your environment

npx @mui/envinfo
  System:
    OS: macOS 15.2
  Binaries:
    Node: 22.12.0 - /usr/local/bin/node
    npm: 10.9.0 - /usr/local/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 123.0.6312.86
  npmPackages:
    @emotion/react: ~11.14.0 => 11.14.0 
    @emotion/styled: ~11.14.0 => 11.14.0 
    @mui/base:  5.0.0-beta.40-0 
    @mui/core-downloads-tracker:  5.16.13 
    @mui/icons-material: ~5.16.13 => 5.16.13 
    @mui/lab: 5.0.0-alpha.175 => 5.0.0-alpha.175 
    @mui/material: ~5.16.13 => 5.16.13 
    @mui/private-theming:  5.16.13 
    @mui/styled-engine:  5.16.13 
    @mui/styles: ~5.16.13 => 5.16.13 
    @mui/system: ~5.16.13 => 5.16.13 
    @mui/types:  7.2.20 
    @mui/utils:  6.3.0 
    @mui/x-charts: ~7.23.2 => 7.23.2 
    @mui/x-charts-vendor:  7.20.0 
    @mui/x-data-grid:  7.23.5 
    @mui/x-data-grid-premium: ~7.23.0 => 7.23.5 
    @mui/x-data-grid-pro:  7.23.5 
    @mui/x-date-pickers:  7.23.3 
    @mui/x-date-pickers-pro: ~7.23.3 => 7.23.3 
    @mui/x-internals:  7.23.0 
    @mui/x-license:  7.23.5 
    @mui/x-tree-view: ~7.23.2 => 7.23.2 
    @types/react: ~18.3.18 => 18.3.18 
    react: ~18.3.1 => 18.3.1 
    react-dom: ~18.3.1 => 18.3.1 
    typescript: ~5.7.2 => 5.7.2 

Search keywords: datagrid

Order ID: 100790

Metadata

Metadata

Assignees

Labels

customization: logicLogic customizability.feature: AggregationRelated to the data grid Aggregation featurescope: data gridChanges related to the data grid.support: premium standardSupport request from a Premium standard plan user. https://mui.com/legal/technical-support-sla.type: bugIt doesn't behave as expected.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions