Skip to content

Aggregation value missing for secondary grouped columns at parent group level #6228

@safagenctorun

Description

@safagenctorun

TanStack Table version

v8.21.3

Framework/Library version

React v19.0.0

Describe the bug and the steps to reproduce it

When grouping by multiple columns, the secondary grouped column does not show its aggregated value at the parent group level.

In my case, the Age column has a min aggregation function. When I group by both Department and Age:

  • The Age aggregation works correctly at the Age-group level (shows 24, 34, etc.)
  • But at the Department group level (top-level row), the Age cell is completely blank — even though aggregationFn: 'min' is defined. (See the red box in the screenshot)

This is the same issue reported in [#3232](#3232).

Steps to reproduce:

  1. Create a table with at least two columns that have aggregationFn defined (e.g. min for Age, sum for Salary)
  2. Group by more than one column (e.g. Department → Age)
  3. Expand a top-level group row (e.g. Engineering)
  4. The secondary grouped column (Age) shows an empty cell at the top-level group row instead of the aggregated value

Expected behavior:
The Age column should display 24 (min value) on the Engineering row — aggregation should work at every group level, regardless of whether that column is itself grouped.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/sandbox/3j77s3

Screenshots or Videos (Optional)

Image

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions