Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Incorrect pagination behavior with autoResetPageIndex set to true when deleting rows

オープン
#4,994 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@cipherprofessor がすでに取り組んでいます。

2026年9月23日 から。

  • #6600 @cipherprofessor による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

まず、ページネーション、削除用の表示列、および autoResetPageIndex を false に設定した、約束されていた最小限の再現可能な例を作成します。最後のページの最終行を削除したときにページネーションの状態がどのように反応するかを追跡し、その後、pageIndex が更新後のページ数の範囲内にとどまることと、関連するページネーションのテストが通ることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

Currently working on a table with pagination and a display column that removes the current row.

  • The data for the table is stored in react state and passed into the data prop.
  • The display column performs a removal by filtering the current row out of the state.
    Accordingly, autoResetPageIndex needs to be set to false to prevent the pageIndex state from resetting on every row delete.

Everything works well until all of the rows are deleted on the last page.
The pageIndex state doesnt update, even though the getPageCount response does.
I would assume that even with autoResetPageIndex set to false, the pageIndex state should update when data is deleted and the page count decreases.

Your minimal, reproducible example

will provide on request

Steps to reproduce

Steps To preproduce

  1. Create a table that:
  • uses pagination
  • has a display column to remove the current row
  • has autoResetPageIndex set to false
  • has enough data to populate more than one page
  1. navigate to the last page
  2. remove all of the rows by clicking the delete buttons one by one
Expected behavior

Expected:
When the last row is removed the table state should decrease the pageIndex state to match the page count

Actual:
pageIndex is unchanged and there is no data shown since the pageIndex is out of range relative to the new number of pages

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

issue happens on any OS with any browser

react-table version

8.5.15

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.
主要言語
TypeScript
スター
28.5k
フォーク
3.6k
平均マージ
19時間 40分
マージ済み PR(30日)
8

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/table のほかの issue

TanStack/table の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。