fix: search resetting to page 1

This commit is contained in:
Calum H. (IMB11)
2026-07-27 15:58:41 +01:00
parent 4c2e64e31f
commit 6cb2af27a6
2 changed files with 9 additions and 6 deletions
+4 -2
View File
@@ -975,8 +975,10 @@ const searchState = useBrowseSearch({
watch(
[
() => searchState.query.value,
() => searchState.currentFilters.value,
() => searchState.serverCurrentFilters.value,
() =>
searchState.isServerType.value
? searchState.serverCurrentFilters.value
: searchState.currentFilters.value,
() => projectType.value,
],
() => {
@@ -194,16 +194,17 @@ export function useBrowseSearch(options: UseBrowseSearchOptions): BrowseSearchSt
}
const providedFiltersOrEmpty = computed(() => options.providedFilters?.value ?? [])
const effectiveCurrentFilters = computed(() =>
isServerType.value ? serverCurrentFilters.value : currentFilters.value,
)
watch(
[
query,
maxResults,
options.projectType,
currentSortType,
serverCurrentSortType,
currentFilters,
serverCurrentFilters,
effectiveCurrentSortType,
effectiveCurrentFilters,
overriddenProvidedFilterTypes,
providedFiltersOrEmpty,
],