From 1f7a36490dac38ce0969118c88756c0e8e39bab0 Mon Sep 17 00:00:00 2001 From: nixocio Date: Thu, 14 May 2020 09:38:23 -0400 Subject: [PATCH] Update deletion of items for JobTemplateDetails and WorkflowJobTemplateDetail Update deletion of items for JobTemplateDetails and WorkflowJobTemplateDetail to remove warnings related update on an unmounted component. Use custom hook `useRequest`. closes: https://github.com/ansible/awx/issues/6971 --- .../components/DeleteButton/DeleteButton.jsx | 3 ++ .../JobTemplateDetail/JobTemplateDetail.jsx | 33 ++++++++------- .../WorkflowJobTemplateDetail.jsx | 40 +++++++++---------- 3 files changed, 39 insertions(+), 37 deletions(-) diff --git a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx index f9fe6cb1ea..383d5fab97 100644 --- a/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx +++ b/awx/ui_next/src/components/DeleteButton/DeleteButton.jsx @@ -11,6 +11,7 @@ function DeleteButton({ i18n, variant, children, + isDisabled, }) { const [isOpen, setIsOpen] = useState(false); @@ -19,6 +20,7 @@ function DeleteButton({