diff --git a/web/components/issues/draft-issue-form.tsx b/web/components/issues/draft-issue-form.tsx index cea8a6fb0..bf6af11a1 100644 --- a/web/components/issues/draft-issue-form.tsx +++ b/web/components/issues/draft-issue-form.tsx @@ -132,7 +132,6 @@ export const DraftIssueForm: FC = (props) => { control, getValues, setValue, - setFocus, } = useForm({ defaultValues: prePopulatedData ?? defaultValues, reValidateMode: "onChange", @@ -250,14 +249,12 @@ export const DraftIssueForm: FC = (props) => { }; useEffect(() => { - setFocus("name"); - reset({ ...defaultValues, ...(prePopulatedData ?? {}), ...(data ?? {}), }); - }, [setFocus, prePopulatedData, reset, data]); + }, [prePopulatedData, reset, data]); // update projectId in form when projectId changes useEffect(() => { @@ -359,6 +356,7 @@ export const DraftIssueForm: FC = (props) => { id="name" name="name" type="text" + tabIndex={1} value={value} onChange={onChange} ref={ref} diff --git a/web/components/issues/draft-issue-modal.tsx b/web/components/issues/draft-issue-modal.tsx index a129cf96c..be3cb1f1c 100644 --- a/web/components/issues/draft-issue-modal.tsx +++ b/web/components/issues/draft-issue-modal.tsx @@ -46,15 +46,7 @@ const issueService = new IssueService(); const moduleService = new ModuleService(); export const CreateUpdateDraftIssueModal: React.FC = observer((props) => { - const { - data, - handleClose, - isOpen, - - prePopulateData: prePopulateDataProps, - fieldsToShow = ["all"], - onSubmit, - } = props; + const { data, handleClose, isOpen, prePopulateData: prePopulateDataProps, fieldsToShow = ["all"], onSubmit } = props; // states const [createMore, setCreateMore] = useState(false);