Fixed - Togglable state for dropdown on Autocomplete

pull/2862/head
mertsincan 2022-08-12 10:55:22 +01:00
parent 18455ed9f8
commit 252d147eb5
1 changed files with 13 additions and 6 deletions

View File

@ -445,13 +445,20 @@ export default {
} }
}, },
onDropdownClick(event) { onDropdownClick(event) {
this.$refs.focusInput.focus(); let query = undefined;
const query = this.$refs.focusInput.value;
if (this.dropdownMode === 'blank') if (this.overlayVisible) {
this.search(event, '', 'dropdown'); this.hide(true);
else if (this.dropdownMode === 'current') }
this.search(event, query, 'dropdown'); else {
this.$refs.focusInput.focus();
query = this.$refs.focusInput.value;
if (this.dropdownMode === 'blank')
this.search(event, '', 'dropdown');
else if (this.dropdownMode === 'current')
this.search(event, query, 'dropdown');
}
this.$emit('dropdown-click', { originalEvent: event, query }); this.$emit('dropdown-click', { originalEvent: event, query });
}, },