fix: resolved issue with resetting the draft issue form (#3532)

This commit is contained in:
Anmol Singh Bhatia 2024-02-01 13:33:08 +05:30 committed by GitHub
parent 4e600e4e9b
commit d68669df51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,17 +170,6 @@ export const DraftIssueForm: FC<IssueFormProps> = observer((props) => {
// handleClose();
// };
useEffect(() => {
if (!isOpen || data) return;
setLocalStorageValue(
JSON.stringify({
...payload,
})
);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [JSON.stringify(payload), isOpen, data]);
// const onClose = () => {
// handleClose();
// };
@ -256,14 +245,6 @@ export const DraftIssueForm: FC<IssueFormProps> = observer((props) => {
.finally(() => setIAmFeelingLucky(false));
};
useEffect(() => {
reset({
...defaultValues,
...(prePopulatedData ?? {}),
...(data ?? {}),
});
}, [prePopulatedData, reset, data]);
useEffect(() => {
setFocus("name");
}, [setFocus]);