fix: create issue modal restting (#1647)

This commit is contained in:
Aaryan Khandelwal 2023-07-24 14:39:47 +05:30 committed by GitHub
parent 08a025f67c
commit 6db1db55e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,9 +225,16 @@ export const IssueForm: FC<IssueFormProps> = ({
reset({
...defaultValues,
...initialData,
});
}, [setFocus, initialData, reset]);
// update projectId in form when projectId changes
useEffect(() => {
reset({
...getValues(),
project: projectId,
});
}, [setFocus, initialData, reset, projectId]);
}, [getValues, projectId, reset]);
return (
<>