Skip to content

[data grid] Footer aggregation not showing with initialState with sortModel and pinnedColumns #21115

@genepaul

Description

@genepaul

Steps to reproduce

Steps:

  1. Open this link to live example: (required) https://stackblitz.com/edit/qwdsn7dq?file=src%2FDemo.tsx
  2. Notice that the aggregation isn't showing in the footer
  3. Comment out either sorting or pinnedColumns in the initialState and refresh the preview
  4. Notice that the aggregation now shows.

Current behavior

This appears to have been introduced in 8.19.0, as I had 8.18.0 and started seeing this issue after upgrading. I had made no changes to my code and this started occurring. As noted in the reproduction steps above, the current behavior is that it is not showing an aggregation value in the footer when both sorting and pinnedColumns are passed in initialState.

Expected behavior

I would expect to be able to pass any combination of values to initialState and still see aggregation.

Context

No response

Your environment

npx @mui/envinfo
  Browser: Chrome
  System:
    OS: macOS 14.5
  Binaries:
    Node: 22.15.0 - /Users/ga05465/Developer/component-library/node_modules/.bin/node
    npm: 11.6.2 - /Users/ga05465/Developer/component-library/node_modules/.bin/npm
    pnpm: 10.28.1 - /Users/ga05465/Library/pnpm/pnpm
  Browsers:
    Chrome: Not Found
    Edge: 144.0.3719.92
    Firefox: 147.0.2
    Safari: 17.5
  npmPackages:
    @emotion/react:  11.14.0 
    @emotion/styled:  11.14.1 
    @mui/core-downloads-tracker:  7.3.1 
    @mui/icons-material: ^7.0.1 => 7.3.6 
    @mui/lab: ^7.0.0-beta.10 => 7.0.0 
    @mui/material:  7.3.6 
    @mui/private-theming:  7.3.1 
    @mui/styled-engine:  7.3.1 
    @mui/system: ^7.0.1 => 7.3.6 
    @mui/types:  7.4.6 
    @mui/utils: ^7.0.1 => 7.3.6 
    @mui/x-data-grid: 8.25.0 => 8.25.0 
    @mui/x-data-grid-premium: 8.25.0 => 8.25.0 
    @mui/x-data-grid-pro:  8.11.2 
    @mui/x-date-pickers: 8.25.0 => 8.25.0 
    @mui/x-date-pickers-pro: 8.25.0 => 8.25.0 
    @mui/x-internals:  8.11.2 
    @mui/x-license: ^8.4.0 => 8.23.0 
    @mui/x-telemetry:  8.11.2 
    @mui/x-virtualizer:  0.1.6 
    @types/react: 18.3.27 => 18.3.27 
    react: 18.3.1 => 18.3.1 
    react-dom: 18.3.1 => 18.3.1 
    typescript: 5.9.3 => 5.9.3 

Search keywords: aggregation initialState valueFormatter

Order ID: 124645

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: AggregationRelated to the data grid Aggregation featurescope: data gridChanges related to the data grid.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.type: regressionA bug, but worse, it used to behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions