[WEB-916] fix: description editor missing when using create more button in create issue modal. (#4137)

* [WEB-916] fix: description editor missing when using create more button in create issue modal.

* chore: handle edge cases.

* chore: handle edge cases.
This commit is contained in:
Prateek Shourya 2024-04-08 18:44:04 +05:30 committed by GitHub
parent 39b5a58ce8
commit 8d009187ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -193,6 +193,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
reset({
...defaultValues,
project_id: getValues("project_id"),
description_html: data?.description_html ?? "<p></p>",
});
editorRef?.current?.clearEditor();
};
@ -481,7 +482,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
initialValue={data?.description_html}
customClassName="min-h-[7rem] border-custom-border-100"
onChange={(description: any, description_html: string) => {
onChange(description_html);
onChange(description_html === "" ? "<p></p>" : description_html);
handleFormChange();
}}
mentionHighlights={mentionHighlights}

View File

@ -174,6 +174,7 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
!createMore && handleClose();
if (createMore) {
issueTitleRef && issueTitleRef?.current?.focus();
setDescription("<p></p>");
setChangesMade(null);
}
return response;