Open
Description
TanStack Table version
v8.20.5
Framework/Library version
v18.3.1
Describe the bug and the steps to reproduce it
flexRender(cell.column.columnDef.aggregatedCell ?? cell.column.columnDef.cell, cell.getContext())
becomes meaningless because then aggregatedCell
is not defined, the default aggregatedCell return from ColumnGrouping.getDefaultColumnDef
is used.
- Open the following CodeSandbox
- Click status to group status column
- Profile Progress show
49.995466826778745
, expected to be Profile Progress show50%
Temporal solution: use null or undefined:
{
accessorKey: 'progress',
header: 'Profile Progress',
cell: ({ getValue }) =>
Math.round(getValue<number>() * 100) / 100 + '%',
aggregationFn: 'mean',
aggregatedCell: null,
// aggregatedCell: ({ getValue }) =>
// Math.round(getValue<number>() * 100) / 100 + '%',
}
or
defaultColumn:{
aggregatedCell: undefined,
}
but it looks weird and unnecessary.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
Screenshots or Videos (Optional)
No response
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
Labels
No labels