Manual Pagination doesn't update `table.getRowModel().rows` - it shows all results
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- react, typescript
- 領域
- frontend
研究方向
從 issue 中連結的受控分頁範例開始,檢查可重現的 CodeSandbox,尤其是所參照的 main.tsx 行附近的表格設定和列渲染。將分頁設定與正在渲染的列模型進行比較。當預設檢視顯示 10 個項目,且變更頁碼或頁面大小會更新所顯示的列時,即表示完成。
由索引模型根據 Issue 內容生成。
描述
Describe the bug
I was looking at the manual pagination example here:
https://tanstack.com/table/v8/docs/examples/react/pagination-controlled and noticed that the pagination is happening at the query level.
When trying to add the pagination client side, the logic seems to work properly, but the content doesn't update based on the new pagination values. A reproducible example is here:
https://codesandbox.io/p/sandbox/boring-wilbur-fqkd7r?embed=1&file=%2Fsrc%2Fmain.tsx%3A79%2C37-82%2C6
My default pagination object looks like this:
{
pageIndex: 0,
pageSize: 10
}
but the table shows 100 results. if I change the visible rows from the dropdown in the UI or change the page, the table always shows the whole payload vs paginated results.
Am I actually supposed to slice the data myself off table.getRowModel().rows?
Your minimal, reproducible example
Steps to reproduce
Just load the UI and see the data is not being paginated
Expected behavior
Table should only show 10 items as per the default object
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
whatever codesandbox is running on
react-table version
v8.9.2
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
- 平均合併
- 1 天 4 小時
- 30 天內合併 PR
- 21
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TanStack/table 的其他 Issue
-
svelte-table: controlled expanded and pagination state resets straight after every change可能已有人在做 @NickSpag 於 11 天前認領。 未關閉
難度 4/5 3-5 天 新手友好度 25/100
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 38/100
TanStack/table#6601 · 5 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
Cast required to access custom options when defining a custom plugin/feature可能已有人在做 @sorena-paydar 於 42 天前認領。 未關閉
難度 5/5 一週以上 新手友好度 35/100
維護者通常 1 天內回覆
-
`aggregatedCell` not typed against bound `cellComponents` in `createAppColumnHelper`可能已有人在做 @cpruijsen 於 53 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 35/100
維護者通常 1 天內回覆
相似的 Issue
-
area: frontend priority: normal
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
formbricks/formbricks#9918 ·
維護者通常 1 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 65/100
thecodacus/pithagoras#364 ·
維護者通常 1 天內回覆
-
TestAutonomousStop_ReportsObservedState fails under host load: 1s wall-clock ceiling vs 250ms cycle未關閉type:bug
難度 2/5 1-3 小時 新手友好度 65/100
nightgauge/nightgauge#2909 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 84/100
維護者通常 1 天內回覆