bbovenzi commented on code in PR #55999:
URL: https://github.com/apache/airflow/pull/55999#discussion_r2372906490
##########
airflow-core/src/airflow/ui/src/utils/useFiltersHandler.ts:
##########
@@ -56,26 +56,32 @@ export const useFiltersHandler = (searchParamKeys:
Array<FilterableSearchParamsK
const [searchParams, setSearchParams] = useSearchParams();
const { setTableURLState, tableURLState } = useTableURLState();
const { pagination, sorting } = tableURLState;
-
const handleFiltersChange = useCallback(
(filters: Record<string, FilterValue>) => {
- filterConfigs.forEach((config) => {
- const value = filters[config.key];
-
- if (value === null || value === undefined || value === "") {
- searchParams.delete(config.key);
- } else {
- searchParams.set(config.key, String(value));
- }
- });
-
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
sorting,
});
- setSearchParams(searchParams);
+
+ setSearchParams((prevParams) => {
+ const newParams = new URLSearchParams(prevParams);
+
+ filterConfigs.forEach((config) => {
+ const value = filters[config.key];
+
+ if (value === null || value === undefined || value === "") {
+ newParams.delete(config.key);
+ } else {
+ newParams.set(config.key, String(value));
+ }
+ });
+
+ newParams.delete("offset");
Review Comment:
```suggestion
newParams.delete(SearchParamsKeys.OFFSET);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]