mirror of https://github.com/ElemeFE/element
Select: fix remote filter not showing dropdown issue (#1535)
parent
f508fd703e
commit
06a739ff22
|
@ -129,10 +129,7 @@
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return this.t('el.select.loading');
|
return this.t('el.select.loading');
|
||||||
} else {
|
} else {
|
||||||
if (this.voidRemoteQuery) {
|
if (this.remote && this.query === '') return false;
|
||||||
this.voidRemoteQuery = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (this.filterable && this.filteredOptionsCount === 0) {
|
if (this.filterable && this.filteredOptionsCount === 0) {
|
||||||
return this.t('el.select.noMatch');
|
return this.t('el.select.noMatch');
|
||||||
}
|
}
|
||||||
|
@ -198,7 +195,6 @@
|
||||||
selectedLabel: '',
|
selectedLabel: '',
|
||||||
hoverIndex: -1,
|
hoverIndex: -1,
|
||||||
query: '',
|
query: '',
|
||||||
voidRemoteQuery: false,
|
|
||||||
bottomOverflowBeforeHidden: 0,
|
bottomOverflowBeforeHidden: 0,
|
||||||
topOverflowBeforeHidden: 0,
|
topOverflowBeforeHidden: 0,
|
||||||
optionsAllDisabled: false,
|
optionsAllDisabled: false,
|
||||||
|
@ -238,7 +234,6 @@
|
||||||
if (this.remote && typeof this.remoteMethod === 'function') {
|
if (this.remote && typeof this.remoteMethod === 'function') {
|
||||||
this.hoverIndex = -1;
|
this.hoverIndex = -1;
|
||||||
this.remoteMethod(val);
|
this.remoteMethod(val);
|
||||||
this.voidRemoteQuery = val === '';
|
|
||||||
this.broadcast('ElOption', 'resetIndex');
|
this.broadcast('ElOption', 'resetIndex');
|
||||||
} else if (typeof this.filterMethod === 'function') {
|
} else if (typeof this.filterMethod === 'function') {
|
||||||
this.filterMethod(val);
|
this.filterMethod(val);
|
||||||
|
@ -563,9 +558,6 @@
|
||||||
if (!this.multiple && (!this.value || Array.isArray(this.value))) {
|
if (!this.multiple && (!this.value || Array.isArray(this.value))) {
|
||||||
this.$emit('input', '');
|
this.$emit('input', '');
|
||||||
}
|
}
|
||||||
if (this.remote) {
|
|
||||||
this.voidRemoteQuery = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.debouncedOnInputChange = debounce(this.debounce, () => {
|
this.debouncedOnInputChange = debounce(this.debounce, () => {
|
||||||
this.onInputChange();
|
this.onInputChange();
|
||||||
|
|
Loading…
Reference in New Issue