mirror of https://github.com/ElemeFE/element
parent
c83968258e
commit
7b8eb0fc80
|
@ -138,6 +138,8 @@
|
|||
this.visible = new RegExp(escapeRegexpString(query), 'i').test(this.currentLabel) || this.created;
|
||||
if (!this.visible) {
|
||||
this.select.filteredOptionsCount--;
|
||||
} else if (query === '') {
|
||||
this.select.filteredOptionsCount = this.select.optionsCount;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -450,9 +450,11 @@ describe('Select', () => {
|
|||
vm = getSelectVm({ filterable: true });
|
||||
const select = vm.$children[0];
|
||||
setTimeout(() => {
|
||||
select.visible = true;
|
||||
select.$nextTick(() => {
|
||||
select.selectedLabel = '面';
|
||||
select.onInputChange();
|
||||
select.visible = true;
|
||||
});
|
||||
setTimeout(() => {
|
||||
expect(select.filteredOptionsCount).to.equal(1);
|
||||
done();
|
||||
|
|
Loading…
Reference in New Issue