tdesign-react icon indicating copy to clipboard operation
tdesign-react copied to clipboard

fix(Select): improved label filtering

Open RylanBot opened this issue 3 months ago • 2 comments

🤔 这个 PR 的性质是?

  • [x] 日常 bug 修复
  • [ ] 新特性提交
  • [ ] 文档改进
  • [ ] 演示代码改进
  • [ ] 组件样式/交互改进
  • [ ] CI/CD 改进
  • [ ] 重构
  • [ ] 代码风格优化
  • [ ] 测试用例
  • [ ] 分支合并
  • [ ] 其他

🔗 相关 Issue

💡 需求背景和解决方案

Select:(历史相关 PR:https://github.com/Tencent/tdesign-react/pull/973#issuecomment-1166715704)

  • https://github.com/Tencent/tdesign-react/issues/2019
  • https://github.com/Tencent/tdesign-react/issues/2812
  • 经验证,label 只要不是 string,哪怕不是 TNode,是纯数字或者布尔也会出问题

Cascader

  • https://github.com/Tencent/tdesign-react/issues/3439
image

(右边为当前效果... Input 框的撑开高度交给用户自己设置 inputClass 更加自由,下拉框的选项高度,通过组件库主动给高度设为 auto 比较合理)

TreeSelect

  • https://github.com/Tencent/tdesign-react/issues/2688

📝 更新日志

  • fix(Select): 修复 label 为非 string 类型时,开启 filterable 搜索后报错的问题

  • fix(Select): 修复使用 label / content / children 自定义元素时,下拉框选项的高度没有撑开的问题

  • fix(SelectInput): 修复 inputProps.inputClass 无法生效的问题

  • fix(SelectInput): 修复单选且 valueDisplay 为自定义元素时,开启 filterable 无法显示输入内容的问题

  • feat(SelectInput): 支持 focus 时的内容为 valueDisplay 的对应值

  • [ ] 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项。⚠️

  • [x] 文档已补充或无须补充
  • [x] 代码演示已提供或无须提供
  • [x] TypeScript 定义已补充或无须补充
  • [x] Changelog 已提供或无须提供

RylanBot avatar Oct 13 '25 13:10 RylanBot

commit: 5e3edce

pkg-pr-new[bot] avatar Oct 13 '25 13:10 pkg-pr-new[bot]

完成

github-actions[bot] avatar Oct 13 '25 13:10 github-actions[bot]