Skip to content

[data grid] Column aggregation breaks if sortModel is passed to props #19370

@flvinny

Description

@flvinny

Steps to reproduce

Steps:

  1. Open this link to live example: https://stackblitz.com/edit/github-p76sjn2j?file=src%2Fdemo.tsx
  2. No further steps necessary to reproduce the bug.
    • The bug seemingly only happens the first time the data grid is rendered - triggering a re-render by editing the file will "fix" it. When this happens, you can refresh stackblitz's preview page to have it happen again.

Current behavior

Aggregated columns don't show their expected value on the first time the data grid is rendered.

Expected behavior

Aggregated columns should always show their expected value.

Context

No response

Your environment

npx @mui/envinfo
  System:
    OS: Windows 11 10.0.26100
  Binaries:
    Node: 24.3.0 - ~\scoop\apps\nvm\current\nodejs\nodejs\node.EXE
    npm: 11.4.2 - ~\scoop\apps\nvm\current\nodejs\nodejs\npm.CMD
    pnpm: Not Found
  Browsers:
    Chrome: Not Found
    Edge: Chromium (139.0.3405.119)
  npmPackages:
    @emotion/react: 11.14.0 => 11.14.0
    @emotion/styled: 11.14.0 => 11.14.0
    @mui/core-downloads-tracker:  7.2.0
    @mui/icons-material: 7.0.2 => 7.0.2
    @mui/lab: ^7.0.0-beta.14 => 7.0.0-beta.14
    @mui/material: ^7.2.0 => 7.2.0
    @mui/private-theming:  7.2.0
    @mui/styled-engine:  7.2.0
    @mui/system:  7.2.0
    @mui/types:  7.4.5
    @mui/utils:  7.3.1
    @mui/x-data-grid: ^8.9.1 => 8.10.2
    @mui/x-data-grid-premium: ^8.9.1 => 8.10.2
    @mui/x-data-grid-pro:  8.10.2
    @mui/x-date-pickers: ^8.9.0 => 8.9.2
    @mui/x-date-pickers-pro: ^8.9.2 => 8.9.2
    @mui/x-internals:  8.9.2
    @mui/x-license:  8.9.2
    @mui/x-telemetry:  8.5.3
    @mui/x-tree-view: ^8.10.0 => 8.10.0
    @mui/x-virtualizer:  0.1.3
    @types/react: 19.1.2 => 19.1.2
    react: 19.1.0 => 19.1.0
    react-dom: 19.1.0 => 19.1.0
    typescript: 5.8.3 => 5.8.3

Search keywords: aggregation sort model sorting sortModel

Order ID: 107216

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: 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