Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Row selection acting strange when using fully controlled table

Offen
#4,812 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
react, typescript
Bereich
frontend

Rechercherichtung

Beginne mit der minimalen Reproduktion in CodeSandbox, insbesondere mit src/main.tsx ungefähr in den Zeilen 667-702, und reproduziere das Problem auf der zweiten, dritten oder vierten Seite. Untersuche getToggleAllPageRowsSelectedHandler und das Verhalten der kontrollierten Paginierung. Erledigt ist es, wenn die Auswahl im Header die aktuell angezeigte Seite statt der ersten Seite auswählt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Describe the bug

When I try to use table row selection with fully controlled state and i'm on the second page, then it selects the first page.

I think it's either the selection function is not accounting for the page index in getToggleAllPageRowsSelectedHandler OR it is re-rendering the page index back to 0.

Your minimal, reproducible example

https://codesandbox.io/s/tanstack-table-fullycontrolled-w-selection-gmuhmm?file=/src/main.tsx:667-702

Steps to reproduce
  1. Go to second, third, or fourth page of table
  2. Click the header selection
  3. See that something did get selected.
  4. Go back to first page and see the first page gets selected.
Expected behavior

As a user I expect to see the page that im on get selected when using the header selection.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

mac OS, chrome, Version 112.0.5615.49 (Official Build) (arm64)

react-table version

8.8.5

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.
Vorherrschende Sprache
TypeScript
Sterne
28.5k
Forks
3.6k
Ø Merge
1 T. 3 Std.
Gemergte PRs (30 T.)
22

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/table

Alle Issues in TanStack/table

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.