From f40bbcba1874d00629e8f7742a09021f8b81ff5f Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Mon, 11 Sep 2023 13:07:40 +0200 Subject: [PATCH] fix: open as chart should open in new tab (DHIS2-15794) (#2956) By opening in a new tab, the user will not lose their work Fixes https://dhis2.atlassian.net/browse/DHIS2-15794 --- src/components/layers/overlays/OverlayCard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/layers/overlays/OverlayCard.js b/src/components/layers/overlays/OverlayCard.js index 7c1405dff..cfd1e86e3 100644 --- a/src/components/layers/overlays/OverlayCard.js +++ b/src/components/layers/overlays/OverlayCard.js @@ -105,7 +105,10 @@ const OverlayCard = ({ await set(currentAO) // Open it in another app - window.location.href = `${baseUrl}/${APP_URLS[type]}/#/currentAnalyticalObject` + window.open( + `${baseUrl}/${APP_URLS[type]}/#/currentAnalyticalObject`, + '_blank' + ) } : undefined }