From 903c045b9c1175ebe6f9be55d2a431fd892cefab Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Wed, 12 Nov 2025 13:08:40 +1100 Subject: [PATCH] fix: retain `searchParams` in `paginatedInterceptions` during filter updates (#20725) This pull-request ensures that when we attempt to navigate in-between pages or actually attempt to update the filters that they will persist as we expect. This was also causing an issue where on first load (or where it lacked `page=1` to be specific) that these would seem to lose their input. --- site/src/api/queries/aiBridge.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/site/src/api/queries/aiBridge.ts b/site/src/api/queries/aiBridge.ts index ba623637e9..1e385bc464 100644 --- a/site/src/api/queries/aiBridge.ts +++ b/site/src/api/queries/aiBridge.ts @@ -7,6 +7,7 @@ export const paginatedInterceptions = ( searchParams: URLSearchParams, ): UsePaginatedQueryOptions => { return { + searchParams, queryPayload: () => searchParams.get(useFilterParamsKey) ?? "", queryKey: ({ payload, pageNumber }) => { return ["aiBridgeInterceptions", payload, pageNumber] as const;