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

When sorting on date grouped column of year is not taken into account

Aperta
#4,628 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia con il CodeSandbox collegato, in particolare src/main.tsx, e riproduci il comportamento di ordinamento per anni raggruppati usando TanStack Table v8.7.4. Confronta l’ordinamento della colonna della data con quello della colonna dell’anno raggruppato e ispeziona i punti di ingresso rilevanti per l’ordinamento e il raggruppamento. Il lavoro è completato quando gli anni raggruppati vengono ordinati in modo coerente con la colonna della data oppure quando il comportamento modificato è documentato chiaramente.

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

Descrizione

Describe the bug

I dont know if this is a bug or changed behaviour since v7.

  1. I have a data object value 'caseDate' which is used as row.caseDate.slice(-4) to get the year for the 'year' column.
  2. I have a date column where the same caseDate is formatted as a pretty date and parsed to getTime for sorting in accessorFn.
  3. I have the 'year' column grouped.
  4. If I use the 'date 'column as a default sorting the 'year' grouped column is just sorted as the data comes in instead of also sorted by date because it also uses caseDate. In v7 this was the case and would also order the grouped column.
Your minimal, reproducible example

https://codesandbox.io/s/optimistic-rhodes-2bbzse?file=/src/main.tsx

Steps to reproduce

Just see how the year column is not sorted as the date column.

Expected behavior

I would expect this to work the same as in v7 or a clear explanation why this logic has changed.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Chrome MacOs

react-table version

v8.7.4

TypeScript version

No response

Additional context

No response

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.4k
Fork
3.6k
Merge medio
1g 1h
PR unite (30g)
7

Guida per i contributori

Apri la guida per i contributori

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.