Repository navigation
fix(TreeSelect): apply ConfigProvider className/style and prevent popup style leak - #59343
Conversation
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
👁 Visual Regression Report for PR #59343 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
Bundle ReportChanges will increase total bundle size by 62 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
More templates
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature #59343 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 834 834
Lines 16136 16139 +3
Branches 4263 4264 +1
=========================================
+ Hits 16136 16139 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
LGTM,@zombieJ 帮忙看看。 |
53b2bc7 to
2ae8917
Compare
nrps9909
left a comment
There was a problem hiding this comment.
Reviewed exact head 2ae8917a9e729dbf97a81654eb776063a4a44663.
The change keeps TreeSelect root configuration on the trigger, isolates popup.root, and preserves the intended style priority across ConfigProvider semantic styles, ConfigProvider style, component semantic styles, and component style. I found no blocker.
Validation:
- TreeSelect suite: 7 suites passed, 80 tests passed, 2 skipped, 45 snapshots passed
- independent four-layer priority and popup-isolation probe passed
- TypeScript, ESLint, and Biome passed
- exact-head remote checks are green (with the expected package-version verification skip)
Independent review performed with OpenAI Codex assistance.
meet-student
left a comment
There was a problem hiding this comment.
中文
LGTM。ConfigProvider 的 treeSelect.className/style 作用到选择器根节点,并且从 popup 上拿掉 mergedStyles.root,避免高度/overflow 漏到下拉层。这是正确修法。
注意:master 上还有功能重叠的 #59330,建议合入本 PR 后关闭另一条。
English
LGTM. ConfigProvider treeSelect.className/style now apply to the selector root, and mergedStyles.root is no longer copied onto the popup. That is the right fix.
Note: #59330 overlaps this on master. Close that one after this lands.


🤔 这个变动的性质是?
🔗 相关 Issue
fix #59329
按维护者评审建议,本 PR 替代 #59230 和 #59330,统一完成修复。
💡 需求背景和解决方案
ConfigProvider 的
treeSelect全局className/style被静默忽略(#59329)——TreeSelect 未从组件配置读取这两个属性;同时根节点语义classNames.root/styles.root会泄漏到下拉弹层(v6 #53229 引入的遗留行为,Select 已移除而 TreeSelect 保留,导致height、overflow等根节点样式影响弹层)。两个问题按维护者建议应基于 feature 分支统一修复,方案参照 Select:
className/style,经useSemanticRootStyle纳入语义合并,优先级保持 ConfigProviderstyles.root→ ConfigProviderstyle→ 组件styles.root→ 组件style;popup.root。此前依赖classNames.root/styles.root影响弹层的写法不再生效(与 Select 对齐),请改用rootClassName或popup.root。已新增隔离与全局配置两处回归测试,并更新受影响的 demo 快照。
📝 更新日志
treeSelectclassName/styleconfig and rootclassNames/stylesleaking into popup.treeSelect全局className/style,且根节点语义样式泄漏到弹层的问题。