fix/draft issue modal focus issue fix (#3522)
This commit is contained in:
parent
2c67aced15
commit
dc5a5f4a91
1 changed files with 5 additions and 3 deletions
|
|
@ -257,14 +257,16 @@ export const DraftIssueForm: FC<IssueFormProps> = observer((props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setFocus("name");
|
|
||||||
|
|
||||||
reset({
|
reset({
|
||||||
...defaultValues,
|
...defaultValues,
|
||||||
...(prePopulatedData ?? {}),
|
...(prePopulatedData ?? {}),
|
||||||
...(data ?? {}),
|
...(data ?? {}),
|
||||||
});
|
});
|
||||||
}, [setFocus, prePopulatedData, reset, data]);
|
}, [prePopulatedData, reset, data]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setFocus("name");
|
||||||
|
}, [setFocus]);
|
||||||
|
|
||||||
// update projectId in form when projectId changes
|
// update projectId in form when projectId changes
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue