From 206a3be958ca3f7995efd6a5f2490612385de5c9 Mon Sep 17 00:00:00 2001 From: Achraf Mohyeddine Date: Tue, 3 Dec 2024 10:21:57 +0100 Subject: [PATCH] front: ensure stdcm form and simulations clear on page refresh Signed-off-by: Achraf Mohyeddine --- .../applications/stdcm/components/StdcmForm/StdcmConfig.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx index 98de0b57a78..3f2dd5bbbfb 100644 --- a/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx +++ b/front/src/applications/stdcm/components/StdcmForm/StdcmConfig.tsx @@ -58,6 +58,7 @@ const StdcmConfig = ({ updateGridMarginBefore, updateStdcmStandardAllowance, updateStdcmPathStep, + resetStdcmConfig, } = useOsrdConfActions() as StdcmConfSliceActions; const { @@ -139,6 +140,10 @@ const StdcmConfig = ({ } }, [infra]); + useEffect(() => { + dispatch(resetStdcmConfig()); + }, []); + return (
{isDebugMode && (