Repository navigation
Conversation
lnuxe
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
November 12, 2026 10:04
lnuxe
force-pushed
the
fix/table-select-all-controlled-pagination
branch
from
November 13, 2026 03:07
fcf6478 to
2bc63e2
Compare
currentPaginateData was recomputed by a useMemo whose dependency list only held [data, reserveSelectedRowOnPaginate]. Changing the page left the slice pointing at the previous page, so select-all on page 2 selected the rows of page 1. Add the pagination fields the slice actually reads. Verified: - new test fails on the previous implementation (expected [ 1, 2 ] to deeply equal [ 3, 4 ]) - new test passes with the fix - table: 49 tests pass
lnuxe
force-pushed
the
fix/table-select-all-controlled-pagination
branch
from
November 17, 2026 02:06
904be9b to
a40f908
Compare
Contributor
Author
|
先关掉,收敛一下数量。 本仓库我这边积压的 open PR 偏多,维护者审不过来,反而稀释了每个 PR 的信号。这个修复本身是有效的,分支保留在 fork: 保留的是影响面更大、或已经有维护者反馈的那几个。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 这个 PR 的性质是?
🔗 相关 Issue
无(本 PR 直接修复受控分页下全选按旧页计算)
📝 描述
同步
currentPaginateData的 effect 依赖数组漏了分页字段:本地数据 + 父组件控制
pagination.current时,data引用不变,切片永远停在第一页。表格渲染第 2 页是对的,但全选/半选仍基于第 1 页的行——在第 2 页点表头复选框,回传的是第 1 页的 key。改动
把 effect 实际读取的分页字段补进依赖:
🔍 自测
修复前(还原
useRowSelect.tsx后跑新测试):修复后:
第二个用例确认第 1 页的行为没有被改变。
回归:
✅ 贡献者检查