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: showFilteredOnly, searchPosition in trigger, fix panel's options incorrectly display problem #2345

Merged
merged 4 commits into from
Jul 16, 2024

Conversation

YyumeiZhang
Copy link
Collaborator

@YyumeiZhang YyumeiZhang commented Jul 15, 2024

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #
2179 中修复单选行为下展开异常问题时。增加了一个判断 inputValue 是否为空决定在弹出层关闭时是否需要调用 clearInput 的逻辑。预期是减少不必要的函数调用。
clearInput 中包含了重新计算面板需要显示的选项逻辑。
由于多选时候,在节点选中后,会做清除 inputValue 的操作,导致多选,可搜索,showFilteredOnly,以及 searchPosition 在trigger 中时,搜索状态下,选中节点后,再关闭弹出层,由于 inputValue 为空,导致 clearInput 未被调用。因此面板显示项目未重新计算。显示不符合预期。

修复操作:

  • 删除通过 inputValue 是否存在决定是否调用 clearInput 的逻辑。
  • 增加测试用例保证此情况下下组件表现稳定性

Changelog

🇨🇳 Chinese

  • Fix: 修复showFilteredOnly 并且搜索框在 trigger 中的 treeSelect 面板显示不正确问题

🇺🇸 English

  • Fix: Fixed the problem of incorrect display of the treeSelect panel of showFilteredOnly, searchPosition in trigger

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

@pointhalo
Copy link
Collaborator

image
有个 ts check error

Copy link

codesandbox-ci bot commented Jul 16, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 321b2fe:

Sandbox Source
pr-story Configuration

@YyumeiZhang YyumeiZhang requested a review from pointhalo July 16, 2024 07:31
Copy link

cypress bot commented Jul 16, 2024

Passing run #2649 ↗︎

0 266 11 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 321b2fe into e5473eb...
Project: semi-design Commit: fbde83566e ℹ️
Status: Passed Duration: 09:55 💡
Started: Jul 16, 2024 10:22 AM Ended: Jul 16, 2024 10:32 AM

Review all test suite changes for PR #2345 ↗︎

@YyumeiZhang YyumeiZhang force-pushed the fix/treeSelect-showFilteredOnly branch from 8d6811b to 321b2fe Compare July 16, 2024 10:13
@pointhalo pointhalo merged commit 9712e55 into main Jul 16, 2024
8 of 9 checks passed
@pointhalo pointhalo deleted the fix/treeSelect-showFilteredOnly branch July 16, 2024 11:15
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.

2 participants