From 066cae15fef31d6d834288685b9196a8618de06e Mon Sep 17 00:00:00 2001 From: Dennis Kigen Date: Mon, 29 Apr 2024 21:14:48 +0300 Subject: [PATCH] (feat) Adapt cancel logic in the react form engine workspace --- .../src/form-renderer/form-renderer.component.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/esm-form-engine-app/src/form-renderer/form-renderer.component.tsx b/packages/esm-form-engine-app/src/form-renderer/form-renderer.component.tsx index 784a97f5b8..b4304780c8 100644 --- a/packages/esm-form-engine-app/src/form-renderer/form-renderer.component.tsx +++ b/packages/esm-form-engine-app/src/form-renderer/form-renderer.component.tsx @@ -34,8 +34,8 @@ const FormRenderer: React.FC = ({ const handleCloseForm = useCallback(() => { closeWorkspace(); - launchPatientWorkspace('clinical-forms-workspace'); - }, [closeWorkspace]); + !encounterUuid && launchPatientWorkspace('clinical-forms-workspace'); + }, [closeWorkspace, encounterUuid]); const handleMarkFormAsDirty = useCallback( (isDirty: boolean) => promptBeforeClosing(() => isDirty),