KoviAnusha commented on code in PR #57265:
URL: https://github.com/apache/airflow/pull/57265#discussion_r2464286911
##########
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:
Thanks for adding the test. This helps make sure we don’t break this
behavior later. Maybe down the road we can move this into a small shared util
if more buttons start using the same pattern. Overall it is good!
--
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]