diff --git a/src/components/Select.vue b/src/components/Select.vue index 6c8764a..8033aac 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -1080,7 +1080,7 @@ */ inputClasses() { return { - hidden: !this.isValueEmpty && !this.dropdownOpen + hidden: !this.isValueEmpty && !this.dropdownOpen && !this.mutableLoading } }, diff --git a/test/unit/specs/Select.spec.js b/test/unit/specs/Select.spec.js index 81770e0..4df5b39 100644 --- a/test/unit/specs/Select.spec.js +++ b/test/unit/specs/Select.spec.js @@ -1603,7 +1603,6 @@ describe('Select.vue', () => { expect(vm.$children[0].inputClasses.hidden).toEqual(true) }) - it('should not apply the "hidden" class to the search input when a value is present, and the dropdown is open', (done) => { const vm = new Vue({ template: '
', @@ -1623,6 +1622,24 @@ describe('Select.vue', () => { }) }) + it('should not apply the "hidden" class to the search input when a value is present, the dropdown is closed, and options are loading', (done) => { + const vm = new Vue({ + template: '
', + data: { + value: 'one', + options: ['one', 'two', 'three'], + open: true + } + }).$mount() + vm.$refs.select.toggleLoading(true) + Vue.nextTick(() => { + Vue.nextTick(() => { + expect(vm.$children[0].inputClasses.hidden).toEqual(false) + done() + }) + }) + }) + it ('should not reset the search input on focus lost when clearSearchOnSelect is false', (done) => { const vm = new Vue({ template: '
',