fix(monitor): isolate batch search scope

This commit is contained in:
lingniu
2026-07-16 04:52:35 +08:00
parent 14525887ea
commit 25f3fa9c64
8 changed files with 113 additions and 20 deletions

View File

@@ -4,8 +4,8 @@ export const QUERY_MEMORY = {
summaryGcTime: 60_000
} as const;
export function retainPreviousPageWithinScope<T>(scope: string) {
return (previous: T | undefined, previousQuery?: { queryKey: readonly unknown[] }) => previousQuery?.queryKey[1] === scope ? previous : undefined;
export function retainPreviousPageWithinScope<T>(scope: string, scopeIndex = 1) {
return (previous: T | undefined, previousQuery?: { queryKey: readonly unknown[] }) => previousQuery?.queryKey[scopeIndex] === scope ? previous : undefined;
}
export function queryScopeKey(query: object) {