Repository navigation
Conversation
lnuxe
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
November 16, 2026 08:02
The check-all option decided its direction from the internal selected state:
if (checkAll) { ... trigger: isAllSelected ? 'uncheck' : 'check' }
When the caller resets the value from outside, the internal state and the
rendered options disagree for one render, so clicking check-all could fire
the opposite action - unchecking when everything was already cleared.
Compute the direction from the options that are actually rendered and
enabled.
Verified:
- new test fails on the previous implementation
(expected [] to deeply equal [ 'apple', 'orange', 'banana' ])
- new test passes with the fix
- select: 47 tests pass
The check-all test has to reach the option list through document because the popup is teleported to body, so render()'s container does not contain it. Nothing removed those nodes afterwards, which leaves them in body for every later case in the same file - the exact shape of the E-001 mistake. Add an afterEach that runs cleanup() and clears body. Verified: - select: 3 files / 47 tests passed - preflight.sh: 0 failures
拖拽列宽结束后 updateTableAfterColumnResize 同步调用 updateFixedStatus/updateFixedHeader,此时 React 尚未提交新的 tableElmWidth,getBoundingClientRect 读到的是旧 DOM 宽度, 固定列 left/right 偏移基于过期布局计算;外层滚动容器尺寸 不变时 ResizeObserver 不会触发补偿计算,导致先放大再缩小后 固定列区域透出其他列内容。 将固定列位置与溢出状态的重算推迟到状态提交完成后(双 rAF) 执行,并同步刷新列阴影状态。SSR 场景(无 window)直接跳过。
lnuxe
force-pushed
the
fix/table-resize-fixed-column-4188
branch
from
November 17, 2026 02:06
845fd6b to
0313d51
Compare
Collaborator
|
fixed in #4496 |
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
Fixes #4188
修复前后的差异对比
复现场景(对应 issue 中的录屏):固定列(fixed)+ resizable 表格,拖宽某个固定列后再拖窄,固定列区域会透出其他列的内容。
修复前:
updateTableAfterColumnResize同步调用updateFixedStatus()/updateFixedHeader()setTableElmWidth(tableWidth)的状态尚未被 React 提交,setFixedColPosition里th.getBoundingClientRect().width读到的是旧 DOM 宽度left/right偏移基于过期布局计算并写入rowAndColFixedPositiontableContentRef)自身尺寸没有变化,ResizeObserver不会触发补偿计算修复后:
updateTableAfterColumnResize将固定列位置与溢出状态的重算推迟到状态提交完成后执行(双requestAnimationFrame)updateFixedHeader()(重算isWidthOverflow/isFixedHeader)和updateFixedStatus()(重算固定列偏移),此时测量到的是提交后的最终 DOM 宽度skipScrollLimit刷新列阴影状态,保证放大/缩小后左右阴影立即正确📝 更新说明
☑️ 请求合并前的自查清单
fix(table): ...)useColumnResize.fixed.spec.tsx验证双 rAF 时序(同步阶段零副作用 → 第一帧提交 → 第二帧基于新布局重算)与 SSR 安全vitest run90 个文件中仅 guide/select 存在偶发时序失败,已在干净 develop 基线复跑确认与本改动无关(基线同样偶发,重跑即过)type.ts/defaultProps.ts