diff --git a/keep-ui/app/(keep)/extraction/create-or-update-extraction-rule.tsx b/keep-ui/app/(keep)/extraction/create-or-update-extraction-rule.tsx index ca50f4b4d..c2c36291c 100644 --- a/keep-ui/app/(keep)/extraction/create-or-update-extraction-rule.tsx +++ b/keep-ui/app/(keep)/extraction/create-or-update-extraction-rule.tsx @@ -93,6 +93,7 @@ export default function CreateOrUpdateExtractionRule({ }), }); if (response.ok) { + exitEditOrCreateMode(); clearForm(); mutate(); toast.success("Extraction rule created successfully"); @@ -126,7 +127,7 @@ export default function CreateOrUpdateExtractionRule({ } ); if (response.ok) { - exitEditMode(); + exitEditOrCreateMode(); mutate(); toast.success("Extraction updated successfully"); } else { @@ -136,7 +137,7 @@ export default function CreateOrUpdateExtractionRule({ } }; - const exitEditMode = async () => { + const exitEditOrCreateMode = async () => { editCallback(null); clearForm(); }; @@ -301,19 +302,14 @@ export default function CreateOrUpdateExtractionRule({