if-i commented on code in PR #57265:
URL: https://github.com/apache/airflow/pull/57265#discussion_r2463454700
##########
airflow-core/src/airflow/ui/src/components/DagActions/DeleteDagButton.tsx:
##########
@@ -31,15 +31,21 @@ type DeleteDagButtonProps = {
readonly withText?: boolean;
} & ButtonProps;
-const DeleteDagButton = ({ dagDisplayName, dagId, width, withText = true }:
DeleteDagButtonProps) => {
+const DeleteDagButton = ({
+ dagDisplayName,
+ dagId,
+ width,
+ withText = true,
+}: DeleteDagButtonProps) => {
const { onClose, onOpen, open } = useDisclosure();
const navigate = useNavigate();
+ const location = useLocation();
const { t: translate } = useTranslation("dags");
const { isPending, mutate: deleteDag } = useDeleteDag({
dagId,
onSuccessConfirm: () => {
onClose();
- navigate("/dags");
+ navigate({ pathname: "/dags", search: location.search });
},
});
Review Comment:
Thank you for your review! I have added a test (`DeleteDagButton.test.tsx`)
which ensures that when a DAG is deleted from a filtered list, the query
parameters remain preserved. Please let me know if there are any other changes
needed.
--
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]