`getValue` cache not invalidating when `accessorFn` is updated
Maintainer thường phản hồi trong vòng 1 ngày
@ahmadelsayed97 đang làm issue này rồi.
Từ ngày 29/8/2026.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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 bản tái hiện StackBlitz được liên kết tại src/main.tsx và xác nhận rằng việc thay đổi state cập nhật accessorFn của cột, trong khi getValue vẫn tiếp tục trả về giá trị đã được cache. Theo dõi cache của getValue và đường dẫn cập nhật accessorFn; việc sửa lỗi hoàn tất khi các giá trị được hiển thị được làm mới mà không thay đổi id của cột hoặc làm mất trạng thái sắp xếp hiện tại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
TanStack Table version
v8.12.0
Framework/Library version
React v18.2.0
Describe the bug and the steps to reproduce it
When the accessorFn for a column is updated to return a new value, the new value is never displayed in the table. Through a sophisticated series of console.logs, I discovered that when getValue is called on the rerender, the new accessorFn is never called, presumably due to caching on column id.
The use case is a column that displays the name of the person for the current row. We want the user to be able to choose whether to display first or last name first (e.g. Tanner Linsley or Linsley, Tanner). We could just change the column id when the accessorFn is updated, but then we lose the current sort state for that column, ie if the table is currently sorted by name, we want to stay sorted by name after the name format is changed.
Steps to reproduce:
- Define a column where the
accessorFnreturns a different value based on some piece of state - Update that piece of state
- The values in the column don't change
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://stackblitz.com/edit/tanstack-table-rnjqkx?file=src%2Fmain.tsx
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
No, because I do not know how
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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/table
-
Issue template renders `react-table`, not `TanStack/table`Có thể đã có người làm @vishruthasgowda đã nhận 14 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
TanStack/table#6595 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
TanStack/table#6601 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Cast required to access custom options when defining a custom plugin/featureCó thể đã có người làm @sorena-paydar đã nhận 15 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`aggregatedCell` not typed against bound `cellComponents` in `createAppColumnHelper`Có thể đã có người làm @cpruijsen đã nhận 26 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/table
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rajbos/ai-engineering-fluency#2340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community documentation first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
lingdojo/kana-dojo#31864 · 1 bình luận · 5 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
zenstackhq/zenstack#2873 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI: TUI shows onboarding when the provider's API key is only in the environment (e.g. OPENROUTER_API_KEY)Có thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởCLI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
cline/cline#14923 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
paperclipai/paperclip#15490 ·
Maintainer thường phản hồi trong vòng 1 ngày