diff --git a/components/AddStudy/index.tsx b/components/AddStudy/index.tsx index bd8cc26..3db6ceb 100644 --- a/components/AddStudy/index.tsx +++ b/components/AddStudy/index.tsx @@ -30,6 +30,13 @@ const AddStudy: FC = ({ refetchStudies }) => { setIsModalOpen(false); }; + const resetFormValues = () => { + form.setFieldsValue({ Study: '' }); + form.setFieldsValue({ Description: '' }); + }; + + const [form] = Form.useForm(); + const createStudy = () => { setLoading(true); if (!projectId) { @@ -45,6 +52,7 @@ const AddStudy: FC = ({ refetchStudies }) => { setLoading(false); toast(ToastType.SUCCESS, 'Study was successfully created'); handleCancel(); + resetFormValues(); refetchStudies(); }) .catch((error) => { @@ -72,6 +80,7 @@ const AddStudy: FC = ({ refetchStudies }) => {
{ Project ID {project?.projectId} +
+ Pathogen + {project?.pathogen?.commonName} +
Created by: {username}