fix(Select): synchronously derive filtered options - #4389
Draft
RSS1102 wants to merge 4 commits into
Draft
Conversation
Input 在合成输入(composition)期间使用内部状态 composingValue 渲染,外部 value 被程序清空时该状态不会同步。Select 选中选项后会清空筛选词,但 composingValue 仍保留上一次的合成内容,导致再次聚焦进入合成态时,输入框回显旧内容并在其后累加新输入。 - fix(Input): 合成输入开始时以输入框当前内容为起点重置 composingValue - test: 补充 Input 受控清空后再次合成输入、Select filterable 中文输入法筛选的回归测试 closes #4382
RSS1102
requested review from
HaixingOoO,
NWYLZW,
RylanBot,
ZWkang,
carolin913,
honkinglin and
uyarn
as code owners
September 3, 2026 12:25
Contributor
|
Size Change: 0 B Total Size: 115 kB ℹ️ View Unchanged
|
Collaborator
TDesign Component Site Preview Open
|
RSS1102
marked this pull request as draft
September 3, 2026 12:28
commit: |
Contributor
|
Size Change: -153 B (-0.02%) Total Size: 932 kB 📦 View Changed
ℹ️ View Unchanged
|
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
https://tdesign.tencent.com/react/components/select#可过滤的选择器
#4382
perf #4388
💡 需求背景和解决方案
Select 的
filterable面板在选中选项时会立即清空筛选词,但浮层仍处于关闭动画中。原实现通过 effect 更新候选列表,因此可能先提交完整列表,再提交筛选结果,造成“完整列表 → 筛选列表”的短暂闪动。本次修复将候选项标准化和本地过滤结果改为同步派生,保证同一次渲染使用最新的筛选列表;同时保留关闭动画期间的最后一份可见列表,避免清空关键词时提前显示全部选项。已选项映射仍基于完整候选数据,避免筛选或远程搜索后丢失已选标签。
📝 更新日志
tdesign-react
filterable选择选项后关闭面板时短暂显示完整列表的问题filterable下中文输入法筛选选中后再次输入会残留上次筛选内容的问题☑️ 请求合并前的自查清单