From 104e1ecb8ed1061c1ac87e3b0ee633a92c42a0e8 Mon Sep 17 00:00:00 2001 From: Riya Saxena Date: Wed, 9 Oct 2024 11:11:14 -0700 Subject: [PATCH] delete correlation alert trigger fix Signed-off-by: Riya Saxena --- .../pages/Correlations/containers/CreateCorrelationRule.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/pages/Correlations/containers/CreateCorrelationRule.tsx b/public/pages/Correlations/containers/CreateCorrelationRule.tsx index d4e28334..1a4e199d 100644 --- a/public/pages/Correlations/containers/CreateCorrelationRule.tsx +++ b/public/pages/Correlations/containers/CreateCorrelationRule.tsx @@ -1078,7 +1078,11 @@ export const CreateCorrelationRule: React.FC = ( data-test-subj="delete-alert-trigger-icon" iconType="trash" color="danger" - onClick={() => setShowForm(false)} + onClick={() => { + // Clear the trigger values by setting them to an empty object or your initial state + props.setFieldValue('trigger', {}); // Assuming an empty object represents no trigger + setShowForm(false); // Optionally hide the form if that's desired + }} />