Fixed #1389 - Dropdown search don't work with Gboard

pull/2224/head
Tuğçe Küçükoğlu 2022-02-25 16:59:35 +03:00 committed by Tuğçe Küçükoğlu
parent db46ee81af
commit 8524b0181a
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,7 @@
<slot name="header" :value="modelValue" :options="visibleOptions"></slot> <slot name="header" :value="modelValue" :options="visibleOptions"></slot>
<div class="p-dropdown-header" v-if="filter"> <div class="p-dropdown-header" v-if="filter">
<div class="p-dropdown-filter-container"> <div class="p-dropdown-filter-container">
<input type="text" ref="filterInput" v-model="filterValue" @vnode-updated="onFilterUpdated" autoComplete="off" class="p-dropdown-filter p-inputtext p-component" :placeholder="filterPlaceholder" @keydown="onFilterKeyDown" @input="onFilterChange"/> <input type="text" ref="filterInput" :value="filterValue" @vnode-updated="onFilterUpdated" autoComplete="off" class="p-dropdown-filter p-inputtext p-component" :placeholder="filterPlaceholder" @keydown="onFilterKeyDown" @input="onFilterChange"/>
<span class="p-dropdown-filter-icon pi pi-search"></span> <span class="p-dropdown-filter-icon pi pi-search"></span>
</div> </div>
</div> </div>
@ -612,6 +612,7 @@ export default {
return label.startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)); return label.startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
}, },
onFilterChange(event) { onFilterChange(event) {
this.filterValue = event.target.value;
this.$emit('filter', {originalEvent: event, value: event.target.value}); this.$emit('filter', {originalEvent: event, value: event.target.value});
}, },
onFilterUpdated() { onFilterUpdated() {