fix: search resetting to page 1 (#6896)

This commit is contained in:
Calum H.
2026-07-27 15:09:13 +00:00
committed by GitHub
parent 4c2e64e31f
commit 354940a8c6
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,
],