Skip to content

Commit

Permalink
fix(TreeSelect): 修复过滤后无法选中问题
Browse files Browse the repository at this point in the history
  • Loading branch information
chiyu1996 committed Jun 17, 2022
1 parent acebc1e commit 16fe930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tree-select/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ export default mixins(getConfigReceiverMixins<Vue, TreeSelectConfig>('treeSelect
methods: {
async popupVisibleChange(visible: boolean) {
await (this.visible = visible);
this.filterText = '';
this.filterByText = null;
if (this.showFilter && this.visible) {
const searchInput = this.$refs.input as HTMLElement;
searchInput?.focus();
Expand Down Expand Up @@ -273,8 +275,6 @@ export default mixins(getConfigReceiverMixins<Vue, TreeSelectConfig>('treeSelect
},
blur(ctx: InputBlurEventParams[1]) {
this.focusing = false;
this.filterText = '';
this.filterByText = null;
emitEvent<Parameters<TdTreeSelectProps['onBlur']>>(this, 'blur', { value: this.value, ...ctx });
},
remove(options: RemoveOptions<TreeOptionData>) {
Expand Down

0 comments on commit 16fe930

Please sign in to comment.