From b97b3bd10d822e0649186898db2dc1757feb31a8 Mon Sep 17 00:00:00 2001 From: Nishit Suwal <81785002+NSUWAL123@users.noreply.github.com> Date: Thu, 11 Jul 2024 21:10:33 +0545 Subject: [PATCH] fix(createNewProject): save current form step state on previous btn click (#1643) --- src/frontend/src/components/createnewproject/SelectForm.tsx | 5 ++++- src/frontend/src/components/createnewproject/SplitTasks.tsx | 5 ++++- src/frontend/src/components/createnewproject/UploadArea.tsx | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/components/createnewproject/SelectForm.tsx b/src/frontend/src/components/createnewproject/SelectForm.tsx index ce7375c982..42ce85a41f 100644 --- a/src/frontend/src/components/createnewproject/SelectForm.tsx +++ b/src/frontend/src/components/createnewproject/SelectForm.tsx @@ -195,7 +195,10 @@ const SelectForm = ({ flag, geojsonFile, customFormFile, setCustomFormFile }) => btnText="PREVIOUS" btnType="secondary" type="button" - onClick={() => toggleStep(2, '/upload-area')} + onClick={() => { + dispatch(CreateProjectActions.SetIndividualProjectDetailsData(formValues)); + toggleStep(2, '/upload-area'); + }} className="fmtm-font-bold" />