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.
This commit is contained in:
Jake Howell
2025-11-12 13:08:40 +11:00
committed by GitHub
parent 3bb7975a17
commit 903c045b9c
+1
View File
@@ -7,6 +7,7 @@ export const paginatedInterceptions = (
searchParams: URLSearchParams,
): UsePaginatedQueryOptions<AIBridgeListInterceptionsResponse, string> => {
return {
searchParams,
queryPayload: () => searchParams.get(useFilterParamsKey) ?? "",
queryKey: ({ payload, pageNumber }) => {
return ["aiBridgeInterceptions", payload, pageNumber] as const;