Repository navigation
fix(table): read defaultExpandedTreeNodes from its own prop - #4480
Merged
uyarn merged 3 commits intoNov 25, 2026
Merged
Conversation
lnuxe
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
November 12, 2026 09:57
lnuxe
force-pushed
the
fix/table-default-expanded-tree-nodes
branch
from
November 13, 2026 03:03
0806944 to
132cbc4
Compare
useTreeDataExpand seeded the uncontrolled expanded state from
props.defaultSelectedRowKeys:
defaultExpandedTreeNodes: props.defaultSelectedRowKeys || [],
So a table that only set defaultSelectedRowKeys also expanded those rows, and
a table that set defaultExpandedTreeNodes saw it ignored entirely.
Verified:
- new test fails on the previous implementation
(expected [ '0', '1' ] to deeply equal [ '0', '0-0', '0-1', '1' ])
- new test passes with the fix
- the second case confirms defaultSelectedRowKeys no longer expands anything
lnuxe
force-pushed
the
fix/table-default-expanded-tree-nodes
branch
from
November 17, 2026 02:06
132cbc4 to
f794819
Compare
Contributor
Author
|
先关掉,收敛一下数量。 本仓库我这边积压的 open PR 偏多,维护者审不过来,反而稀释了每个 PR 的信号。这个修复本身是有效的,分支保留在 fork: 保留的是影响面更大、或已经有维护者反馈的那几个。 |
Contributor
Author
|
按收敛计划关闭(无维护者反馈)。分支保留在 fork:fix/table-default-expanded-tree-nodes,需要时可重开。 |
Move the default expansion cases into the existing EnhancedTable test. Keep string and number row keys separate from row selection.
RylanBot
approved these changes
Nov 20, 2026
Collaborator
TDesign Component Site Preview Open
|
commit: |
Merged
6 of 16 tasks
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
💡 需求背景和解决方案
📝 更新日志
tdesign-react
defaultExpandedTreeNodes不生效的问题@tdesign-react/chat
☑️ 请求合并前的自查清单