Fix/TreeSelect: showFilteredOnly, searchPosition in trigger, fix panel's options incorrectly display problem #2345
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.
中文模板 / Chinese Template
What kind of change does this PR introduce? (check at least one)
PR description
Fixes #
在 2179 中修复单选行为下展开异常问题时。增加了一个判断 inputValue 是否为空决定在弹出层关闭时是否需要调用 clearInput 的逻辑。预期是减少不必要的函数调用。
clearInput 中包含了重新计算面板需要显示的选项逻辑。
由于多选时候,在节点选中后,会做清除 inputValue 的操作,导致多选,可搜索,showFilteredOnly,以及 searchPosition 在trigger 中时,搜索状态下,选中节点后,再关闭弹出层,由于 inputValue 为空,导致 clearInput 未被调用。因此面板显示项目未重新计算。显示不符合预期。
修复操作:
Changelog
🇨🇳 Chinese
🇺🇸 English
Checklist
Other
Additional information