Skip to content

Commit 903c045

Browse files
authored
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.
1 parent 3bb7975 commit 903c045

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

site/src/api/queries/aiBridge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const paginatedInterceptions = (
77
searchParams: URLSearchParams,
88
): UsePaginatedQueryOptions<AIBridgeListInterceptionsResponse, string> => {
99
return {
10+
searchParams,
1011
queryPayload: () => searchParams.get(useFilterParamsKey) ?? "",
1112
queryKey: ({ payload, pageNumber }) => {
1213
return ["aiBridgeInterceptions", payload, pageNumber] as const;

0 commit comments

Comments
 (0)