forked from github/plane
fix: focus getting removed from description while typing
This commit is contained in:
parent
6aaf9642bb
commit
855c65bc87
@ -132,7 +132,6 @@ export const DraftIssueForm: FC<IssueFormProps> = (props) => {
|
||||
control,
|
||||
getValues,
|
||||
setValue,
|
||||
setFocus,
|
||||
} = useForm<IIssue>({
|
||||
defaultValues: prePopulatedData ?? defaultValues,
|
||||
reValidateMode: "onChange",
|
||||
@ -250,14 +249,12 @@ export const DraftIssueForm: FC<IssueFormProps> = (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<IssueFormProps> = (props) => {
|
||||
id="name"
|
||||
name="name"
|
||||
type="text"
|
||||
tabIndex={1}
|
||||
value={value}
|
||||
onChange={onChange}
|
||||
ref={ref}
|
||||
|
@ -46,15 +46,7 @@ const issueService = new IssueService();
|
||||
const moduleService = new ModuleService();
|
||||
|
||||
export const CreateUpdateDraftIssueModal: React.FC<IssuesModalProps> = 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);
|
||||
|
Loading…
Reference in New Issue
Block a user