Fixed - Togglable state for dropdown on Autocomplete
parent
18455ed9f8
commit
252d147eb5
|
@ -445,13 +445,20 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onDropdownClick(event) {
|
onDropdownClick(event) {
|
||||||
|
let query = undefined;
|
||||||
|
|
||||||
|
if (this.overlayVisible) {
|
||||||
|
this.hide(true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
this.$refs.focusInput.focus();
|
this.$refs.focusInput.focus();
|
||||||
const query = this.$refs.focusInput.value;
|
query = this.$refs.focusInput.value;
|
||||||
|
|
||||||
if (this.dropdownMode === 'blank')
|
if (this.dropdownMode === 'blank')
|
||||||
this.search(event, '', 'dropdown');
|
this.search(event, '', 'dropdown');
|
||||||
else if (this.dropdownMode === 'current')
|
else if (this.dropdownMode === 'current')
|
||||||
this.search(event, query, 'dropdown');
|
this.search(event, query, 'dropdown');
|
||||||
|
}
|
||||||
|
|
||||||
this.$emit('dropdown-click', { originalEvent: event, query });
|
this.$emit('dropdown-click', { originalEvent: event, query });
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue