fix(unified_search): Reset result limit for new search requests

Before now the result limit is never reset until the page is refreshed.

Signed-off-by: nfebe <fenn25.fn@gmail.com>
pull/52900/head
nfebe 2025-05-14 16:06:04 +07:00 committed by backportbot[bot]
parent 728b80b540
commit 4a0c6a8db3
1 changed files with 7 additions and 0 deletions

@ -255,6 +255,7 @@ export default defineComponent({
filteredProviders: [],
searching: false,
searchQuery: '',
lastSearchQuery: '',
placessearchTerm: '',
dateTimeFilter: null,
filters: [],
@ -367,6 +368,12 @@ export default defineComponent({
return
}
// Reset the provider result limit when performing a new search
if (query !== this.lastSearchQuery) {
this.providerResultLimit = 5
}
this.lastSearchQuery = query
this.searching = true
const newResults = []
const providersToSearch = this.filteredProviders.length > 0 ? this.filteredProviders : this.providers