Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(TreeSelect): 修复过滤后无法选中问题 #1008

Closed
wants to merge 4 commits into from
Closed

fix(TreeSelect): 修复过滤后无法选中问题 #1008

wants to merge 4 commits into from

Conversation

Banana-energy
Copy link

@Banana-energy Banana-energy commented Jun 15, 2022

修复过滤后无法选中问题

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#887

💡 需求背景和解决方案

在搜索框失去焦点后将搜索方法置为null,导致tree-select组件刷新

📝 更新日志

  • fix(TreeSelect): 修复过滤后无法选中问题

  • 本条 PR 不需要纳入 Changelog

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

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

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

修复过滤后无法选中问题

fix #887
@codecov-commenter
Copy link

Codecov Report

Merging #1008 (e53c17d) into develop (a0db0df) will increase coverage by 2.03%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1008      +/-   ##
===========================================
+ Coverage    57.56%   59.59%   +2.03%     
===========================================
  Files          346      382      +36     
  Lines        12828    14637    +1809     
  Branches      2405     2747     +342     
===========================================
+ Hits          7384     8723    +1339     
- Misses        5200     5646     +446     
- Partials       244      268      +24     
Impacted Files Coverage Δ
src/affix/affix.tsx 28.57% <0.00%> (-37.51%) ⬇️
src/swiper/props.ts 68.75% <0.00%> (-31.25%) ⬇️
src/dialog/props.ts 70.00% <0.00%> (-30.00%) ⬇️
src/calendar/props.ts 70.00% <0.00%> (-30.00%) ⬇️
src/popup/props.ts 75.00% <0.00%> (-25.00%) ⬇️
src/select/props.ts 75.00% <0.00%> (-25.00%) ⬇️
src/slider/props.ts 75.00% <0.00%> (-25.00%) ⬇️
src/message/props.ts 75.00% <0.00%> (-25.00%) ⬇️
src/tooltip/props.ts 75.00% <0.00%> (-25.00%) ⬇️
src/pagination/props.ts 75.00% <0.00%> (-25.00%) ⬇️
... and 160 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8008f58...e53c17d. Read the comment docs.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2022

完成

@xiaosansiji
Copy link
Collaborator

这样修改有个问题,过滤没命中选项的时候,失去焦点时没办法自动清掉了,这时候用户除了刷新页面没办法再重置下拉框里过滤的结果内容,可以看下预览页面的操作:https://preview-pr1008-tdesign-vue.surge.sh/vue/components/tree-select
Kapture 2022-06-16 at 14 32 39

@Banana-energy
Copy link
Author

那在focus方法中将 filterByText 方法置为null呢,在失去焦点后重新点击时就可以刷新组件了

@xiaosansiji
Copy link
Collaborator

fixed in: #1027

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants