Skip to content

Commit

Permalink
Use setSearchParams after setTableURLState to ensure updates are not …
Browse files Browse the repository at this point in the history
…overriden by setTableURLState. (#45500)
  • Loading branch information
tirkarthi authored Jan 9, 2025
1 parent 521410f commit 9f74a65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/Dag/Runs/Runs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,11 @@ export const Runs = () => {
} else {
searchParams.set(STATE_PARAM, val);
}
setSearchParams(searchParams);
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
sorting,
});
setSearchParams(searchParams);
},
[pagination, searchParams, setSearchParams, setTableURLState, sorting],
);
Expand Down
4 changes: 2 additions & 2 deletions airflow/ui/src/pages/DagsList/DagsFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ export const DagsFilters = () => {
} else {
searchParams.set(PAUSED_PARAM, val);
}
setSearchParams(searchParams);
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
sorting,
});
setSearchParams(searchParams);
},
[pagination, searchParams, setSearchParams, setTableURLState, sorting],
);
Expand All @@ -97,11 +97,11 @@ export const DagsFilters = () => {
} else {
searchParams.set(LAST_DAG_RUN_STATE_PARAM, value);
}
setSearchParams(searchParams);
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
sorting,
});
setSearchParams(searchParams);
},
[pagination, searchParams, setSearchParams, setTableURLState, sorting],
);
Expand Down
2 changes: 1 addition & 1 deletion airflow/ui/src/pages/Variables/Variables.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,11 @@ export const Variables = () => {
} else {
searchParams.delete(NAME_PATTERN_PARAM);
}
setSearchParams(searchParams);
setTableURLState({
pagination: { ...pagination, pageIndex: 0 },
sorting,
});
setSearchParams(searchParams);
setVariableKeyPattern(value);
};

Expand Down

0 comments on commit 9f74a65

Please sign in to comment.