Skip to content

Commit

Permalink
Select: not toggle dropdown when filtering (#12210)
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyoung authored and iamkun committed Mar 27, 2019
1 parent ef33295 commit 799c42d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
:autocomplete="autoComplete || autocomplete"
@focus="handleFocus"
@blur="softFocus = false"
@click.stop
@keyup="managePlaceholder"
@keydown="resetInputState"
@keydown.down.prevent="navigateOptions('next')"
@keydown.up.prevent="navigateOptions('prev')"
@keydown.enter.prevent="selectOption"
@keydown.esc.stop.prevent="visible = false"
@keydown.delete="deletePrevTag"
@keydown.tab="visible = false"
@compositionstart="handleComposition"
@compositionupdate="handleComposition"
@compositionend="handleComposition"
Expand All @@ -80,6 +80,7 @@
:readonly="readonly"
:validate-event="false"
:class="{ 'is-focus': visible }"
:tabindex="(multiple && filterable) ? '-1' : null"
@focus="handleFocus"
@blur="handleBlur"
@keyup.native="debouncedOnInputChange"
Expand Down Expand Up @@ -380,6 +381,7 @@
this.previousQuery = null;
this.selectedLabel = '';
this.inputLength = 20;
this.menuVisibleOnFocus = false;
this.resetHoverIndex();
this.$nextTick(() => {
if (this.$refs.input &&
Expand Down Expand Up @@ -575,7 +577,9 @@
if (!this.softFocus) {
if (this.automaticDropdown || this.filterable) {
this.visible = true;
this.menuVisibleOnFocus = true;
if (this.filterable) {
this.menuVisibleOnFocus = true;
}
}
this.$emit('focus', event);
} else {
Expand Down

0 comments on commit 799c42d

Please sign in to comment.