fix(table): skip checkProps disabled rows on select all#4236
Open
dexterBo wants to merge 1 commit into
Open
Conversation
Collaborator
TDesign Component Site Preview Open
|
commit: |
RylanBot
reviewed
May 13, 2026
| function isDisabled(row: Record<string, any>, rowIndex: number): boolean { | ||
| return isRowSelectedDisabled(selectColumn, row, rowIndex); | ||
| if (!selectColumn) return false; | ||
| return getRowSelectDisabledData({ row, rowIndex, col: selectColumn, colIndex: selectColumnIndex }).disabled; |
Collaborator
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 #3976
💡 需求背景和解决方案
Table 多选列的行 checkbox 已经会读取
checkProps.disabled,但表头全选计算可选行时只过滤了column.disabled,导致点击全选时仍会把通过checkProps.disabled禁用的行加入selectedRowKeys。本 PR 将全选可选行判断复用行选择单元格的禁用判断,确保
column.disabled和checkProps.disabled行为一致,并补充回归测试。📝 更新日志
checkProps.disabled禁用的行☑️ 请求合并前的自查清单
pnpm exec vitest run packages/components/table/__tests__/row.events.test.tsx --testNamePattern "select all skips rows disabled by checkProps"pnpm exec vitest run packages/components/table/__tests__/row.events.test.tsxpnpm exec eslint packages/components/table/hooks/useRowSelect.tsx packages/components/table/__tests__/row.events.test.tsx --max-warnings 0pnpm run lint:tsc