Fixes header search input from Vue3 migrationh. #794.

This commit is contained in:
mateuswetah 2024-02-22 15:23:36 -03:00
parent 85e5ccefb7
commit 9f4546d616
1 changed files with 8 additions and 6 deletions

View File

@ -62,9 +62,9 @@
:model-value="searchQuery"
icon-right="magnify"
icon-right-clickable
@update:model-value="futureSearchQuery = $event.target.value"
@keyup.enter="updateSearch()"
@icon-right-click="updateSearch()" />
@update:model-value="(value) => futureSearchQuery = value"
@keyup.enter="updateSearch"
@icon-right-click="updateSearch" />
<router-link
v-if="!$adminOptions.hideTainacanHeaderAdvancedSearch"
class="advanced-search-text"
@ -138,13 +138,15 @@
this.$emitter.off('openProcessesPopup');
},
methods: {
updateSearch() {
async updateSearch() {
console.log(this.$route.path, this.futureSearchQuery)
this.$eventBusSearch.setSearchQuery(this.futureSearchQuery);
if (this.$route.path !== '/items') {
this.$router.push({
await this.$router.push({
path: '/items',
});
}
this.$eventBusSearch.setSearchQuery(this.futureSearchQuery);
}
}
}