From dc5a5f4a91ac583e83e803daccb2224432e200e6 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:47:47 +0530 Subject: [PATCH] fix/draft issue modal focus issue fix (#3522) --- web/components/issues/draft-issue-form.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/components/issues/draft-issue-form.tsx b/web/components/issues/draft-issue-form.tsx index 3c9870469..79b91ef40 100644 --- a/web/components/issues/draft-issue-form.tsx +++ b/web/components/issues/draft-issue-form.tsx @@ -257,14 +257,16 @@ export const DraftIssueForm: FC = 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(() => {