Skip to content

Commit

Permalink
Cascader: optimize performance (#21231)
Browse files Browse the repository at this point in the history
  • Loading branch information
cs1707 committed Aug 17, 2021
1 parent 6fda9a0 commit 72be8f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/cascader/src/cascader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ export default {
handleDropdownLeave() {
this.filtering = false;
this.inputValue = this.presentText;
this.doDestroy();
},
handleKeyDown(event) {
switch (event.keyCode) {
Expand Down Expand Up @@ -643,7 +644,9 @@ export default {
const offsetHeight = Math.round(tags.getBoundingClientRect().height);
const height = Math.max(offsetHeight + 6, inputInitialHeight) + 'px';
inputInner.style.height = height;
this.updatePopper();
if (this.dropDownVisible) {
this.updatePopper();
}
}
},
Expand Down

0 comments on commit 72be8f5

Please sign in to comment.