Repository navigation
fix(select): toggle object-valued options by their key on Enter - #4533
Open
lanqing431 wants to merge 1 commit into
Open
lanqing431 wants to merge 1 commit into
lanqing431 wants to merge 1 commit into
Conversation
lanqing431
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
anlyyao,
carolin913,
honkinglin and
uyarn
as code owners
December 3, 2026 05:18
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 使用对象值时,键盘回车通过引用识别已选项。值对象和选项对象的键相同却实例不同,会再次选中同一选项。复用原有的选项键比较,取消选中时传递被移除的选项键。
验证
新增组件用例在原版错误触发 check。修复后 31 个测试通过。Chromium 验证回车后选中项为空,onRemove 收到 apple。
更新日志
tdesign-react
自查
实现和测试使用了 AI 辅助。