From 6c457d3f609ba076528098f0e22ecb0d788754c3 Mon Sep 17 00:00:00 2001 From: Tania Date: Thu, 22 Sep 2022 19:32:58 +1000 Subject: [PATCH] fix: clear new-action-items after click cancel button --- .../pages/action-items/action-items-container.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/javascript/components/pages/action-items/action-items-container.tsx b/app/javascript/components/pages/action-items/action-items-container.tsx index 3d2469e2..800877d5 100644 --- a/app/javascript/components/pages/action-items/action-items-container.tsx +++ b/app/javascript/components/pages/action-items/action-items-container.tsx @@ -115,6 +115,11 @@ const ActionItemsContainer: React.FC = () => { setModalOpen(false); handleDeleteAssignment(); //handleAddConfirmComment(); + }; + + const handleCancel = () => { + setConfirmComment(""); + setModalOpen(false); } const getColumnName = (name: string) => { @@ -175,11 +180,11 @@ const ActionItemsContainer: React.FC = () => { ))}
- setModalOpen(false)} > + setModalOpen(false)} + onCancel={handleCancel} disabledButton={isShort || isLong} >