Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Manual Pagination doesn't update `table.getRowModel().rows` - it shows all results

Đang mở
#4,917 4 bình luận 3 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với ví dụ về phân trang được kiểm soát được liên kết trong issue và kiểm tra CodeSandbox có thể tái hiện, đặc biệt là phần thiết lập bảng và kết xuất các hàng xung quanh những dòng main.tsx được tham chiếu. So sánh cấu hình phân trang với mô hình hàng đang được kết xuất. Hoàn tất khi chế độ xem mặc định hiển thị 10 mục và việc thay đổi trang hoặc kích thước trang cập nhật các hàng được hiển thị.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

https://codesandbox.io/p/sandbox/boring-wilbur-fqkd7r?embed=1&file=%2Fsrc%2Fmain.tsx%3A79%2C37-82%2C6

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.
Ngôn ngữ chính
TypeScript
Star
28.5k
Fork
3.6k
Merge trung bình
19 giờ 40 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/table

Tất cả issue của TanStack/table

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.