diff --git a/src/frontend/src/components/createnewproject/ProjectDetailsForm.tsx b/src/frontend/src/components/createnewproject/ProjectDetailsForm.tsx index 4bf5e29cfd..977d6e9522 100644 --- a/src/frontend/src/components/createnewproject/ProjectDetailsForm.tsx +++ b/src/frontend/src/components/createnewproject/ProjectDetailsForm.tsx @@ -29,7 +29,7 @@ const ProjectDetailsForm = ({ flag }) => { navigate('/upload-area'); }; - const { handleSubmit, handleCustomChange, values, errors, checkValidationOnly }: any = useForm( + const { handleSubmit, handleChange, handleCustomChange, values, errors, checkValidationOnly }: any = useForm( projectDetails, submission, CreateProjectValidation, @@ -72,7 +72,10 @@ const ProjectDetailsForm = ({ flag }) => { e.preventDefault(); } }; - + const handleInputChanges = (e) => { + handleChange(e); + dispatch(CreateProjectActions.SetIsUnsavedChanges(true)); + }; return (
@@ -92,45 +95,50 @@ const ProjectDetailsForm = ({ flag }) => {
handleCustomChange('name', e.target.value)} + onChange={handleInputChanges} fieldType="text" required errorMsg={errors.name} />