fix: description not loading while editing an issue (#1349)

This commit is contained in:
Aaryan Khandelwal 2023-06-23 11:09:57 +05:30 committed by GitHub
parent 8982452500
commit 048a01dbf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -451,7 +451,6 @@ export const IssuesView: React.FC<Props> = ({
/>
<CreateUpdateIssueModal
isOpen={editIssueModal && issueToEdit?.actionType !== "delete"}
prePopulateData={{ ...issueToEdit }}
handleClose={() => setEditIssueModal(false)}
data={issueToEdit}
/>

View File

@ -148,7 +148,7 @@ export const IssueForm: FC<IssueFormProps> = ({
setValue,
setFocus,
} = useForm<IIssue>({
defaultValues,
defaultValues: initialData ?? defaultValues,
reValidateMode: "onChange",
});

View File

@ -328,7 +328,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = ({
<IssueForm
issues={issues ?? []}
handleFormSubmit={handleFormSubmit}
initialData={prePopulateData}
initialData={data ?? prePopulateData}
createMore={createMore}
setCreateMore={setCreateMore}
handleClose={handleClose}