mirror of https://github.com/ElemeFE/element
Select: not toggle dropdown when filtering (#17205)
parent
70f6384257
commit
3270276c3c
|
@ -50,7 +50,6 @@
|
||||||
:autocomplete="autoComplete || autocomplete"
|
:autocomplete="autoComplete || autocomplete"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
@blur="softFocus = false"
|
@blur="softFocus = false"
|
||||||
@click.stop
|
|
||||||
@keyup="managePlaceholder"
|
@keyup="managePlaceholder"
|
||||||
@keydown="resetInputState"
|
@keydown="resetInputState"
|
||||||
@keydown.down.prevent="navigateOptions('next')"
|
@keydown.down.prevent="navigateOptions('next')"
|
||||||
|
@ -58,6 +57,7 @@
|
||||||
@keydown.enter.prevent="selectOption"
|
@keydown.enter.prevent="selectOption"
|
||||||
@keydown.esc.stop.prevent="visible = false"
|
@keydown.esc.stop.prevent="visible = false"
|
||||||
@keydown.delete="deletePrevTag"
|
@keydown.delete="deletePrevTag"
|
||||||
|
@keydown.tab="visible = false"
|
||||||
@compositionstart="handleComposition"
|
@compositionstart="handleComposition"
|
||||||
@compositionupdate="handleComposition"
|
@compositionupdate="handleComposition"
|
||||||
@compositionend="handleComposition"
|
@compositionend="handleComposition"
|
||||||
|
@ -80,6 +80,7 @@
|
||||||
:readonly="readonly"
|
:readonly="readonly"
|
||||||
:validate-event="false"
|
:validate-event="false"
|
||||||
:class="{ 'is-focus': visible }"
|
:class="{ 'is-focus': visible }"
|
||||||
|
:tabindex="(multiple && filterable) ? '-1' : null"
|
||||||
@focus="handleFocus"
|
@focus="handleFocus"
|
||||||
@blur="handleBlur"
|
@blur="handleBlur"
|
||||||
@keyup.native="debouncedOnInputChange"
|
@keyup.native="debouncedOnInputChange"
|
||||||
|
@ -566,8 +567,10 @@
|
||||||
if (!this.softFocus) {
|
if (!this.softFocus) {
|
||||||
if (this.automaticDropdown || this.filterable) {
|
if (this.automaticDropdown || this.filterable) {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
if (this.filterable) {
|
||||||
this.menuVisibleOnFocus = true;
|
this.menuVisibleOnFocus = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.$emit('focus', event);
|
this.$emit('focus', event);
|
||||||
} else {
|
} else {
|
||||||
this.softFocus = false;
|
this.softFocus = false;
|
||||||
|
|
Loading…
Reference in New Issue