mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
fix: search resetting to page 1 (#6896)
This commit is contained in:
@@ -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,
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user