mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 21:26:40 +00:00
fix: search resetting to page 1 (#6896)
This commit is contained in:
@@ -975,8 +975,10 @@ const searchState = useBrowseSearch({
|
|||||||
watch(
|
watch(
|
||||||
[
|
[
|
||||||
() => searchState.query.value,
|
() => searchState.query.value,
|
||||||
() => searchState.currentFilters.value,
|
() =>
|
||||||
() => searchState.serverCurrentFilters.value,
|
searchState.isServerType.value
|
||||||
|
? searchState.serverCurrentFilters.value
|
||||||
|
: searchState.currentFilters.value,
|
||||||
() => projectType.value,
|
() => projectType.value,
|
||||||
],
|
],
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
@@ -194,16 +194,17 @@ export function useBrowseSearch(options: UseBrowseSearchOptions): BrowseSearchSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
const providedFiltersOrEmpty = computed(() => options.providedFilters?.value ?? [])
|
const providedFiltersOrEmpty = computed(() => options.providedFilters?.value ?? [])
|
||||||
|
const effectiveCurrentFilters = computed(() =>
|
||||||
|
isServerType.value ? serverCurrentFilters.value : currentFilters.value,
|
||||||
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
[
|
[
|
||||||
query,
|
query,
|
||||||
maxResults,
|
maxResults,
|
||||||
options.projectType,
|
options.projectType,
|
||||||
currentSortType,
|
effectiveCurrentSortType,
|
||||||
serverCurrentSortType,
|
effectiveCurrentFilters,
|
||||||
currentFilters,
|
|
||||||
serverCurrentFilters,
|
|
||||||
overriddenProvidedFilterTypes,
|
overriddenProvidedFilterTypes,
|
||||||
providedFiltersOrEmpty,
|
providedFiltersOrEmpty,
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user