Repository navigation
fix: 修复组件切换为禁用态后弹出层仍可交互的问题 - #4468
Open
Xapollon430 wants to merge 4 commits into
Open
Xapollon430 wants to merge 4 commits into
Xapollon430 wants to merge 4 commits into
Conversation
Xapollon430
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
November 9, 2026 00:15
Collaborator
TDesign Component Site Preview Open
|
commit: |
RylanBot
force-pushed
the
codex/select-ignore-disabled-options
branch
from
November 9, 2026 04:47
21064a6 to
f0640a9
Compare
Block opening while disabled or read-only, and still allow an open popup to close when disabled turns on.
A disabled picker or dropdown no longer changes its value from a click.
RylanBot
approved these changes
Nov 9, 2026
RylanBot
force-pushed
the
codex/select-ignore-disabled-options
branch
from
November 11, 2026 10:00
2902e9a to
38ad5e6
Compare
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 的性质是?
💡 需求背景和解决方案
弹出层已经打开时,如果组件切换为禁用态,用户仍可能通过弹出层修改值或触发回调。以 Select 为例:选中 Apple 后打开下拉列表,在列表仍打开时将
disabled设为true,再点击 Orange。修复前,选中值会变为 Orange,并触发onChange。多选模式下,“全选”也会修改选中值。本 PR 在选项选择、全选及菜单点击等交互入口检查当前禁用状态,并补齐相关组件在禁用时关闭弹出层、阻止再次打开的逻辑。公开 API 保持不变。
查看 Select 的浏览器复现视频
验证
onChange。📝 更新日志
tdesign-react
☑️ 请求合并前的自查清单
本 PR 的实现与测试使用了 AI 辅助。