fix/draft issue modal focus issue fix (#3522)

This commit is contained in:
Anmol Singh Bhatia 2024-01-31 17:47:47 +05:30 committed by GitHub
parent 2c67aced15
commit dc5a5f4a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,14 +257,16 @@ export const DraftIssueForm: FC<IssueFormProps> = observer((props) => {
};
useEffect(() => {
setFocus("name");
reset({
...defaultValues,
...(prePopulatedData ?? {}),
...(data ?? {}),
});
}, [setFocus, prePopulatedData, reset, data]);
}, [prePopulatedData, reset, data]);
useEffect(() => {
setFocus("name");
}, [setFocus]);
// update projectId in form when projectId changes
useEffect(() => {