Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ColumnGrouping.getDefaultColumnDef should not return aggregatedCell

Aperta
#5,778 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #6585 di @ousamabenyounes — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Inizia con il React grouping CodeSandbox collegato e segui ColumnGrouping.getDefaultColumnDef insieme alla chiamata a flexRender descritta nel report. Riproduci la visualizzazione dell’avanzamento raggruppato, quindi verifica che venga mantenuta la formattazione prevista del 50% senza impostare esplicitamente aggregatedCell.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

  1. Open the following CodeSandbox
  2. Click status to group status column
  3. Profile Progress show 49.995466826778745, expected to be Profile Progress show 50%

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)

https://codesandbox.io/p/devbox/github/tanstack/table/tree/main/examples/react/grouping?embed=1&theme=dark

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.
Lingua principale
TypeScript
Stelle
28.5k
Fork
3.6k
Merge medio
19h 40m
PR unite (30g)
8

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/table

Tutte le issue di TanStack/table

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.