From 99618e93a790a883e183c411e3553a68b3a7f7cb Mon Sep 17 00:00:00 2001 From: Palanikannan1437 <73993394+Palanikannan1437@users.noreply.github.com> Date: Tue, 3 Oct 2023 19:59:09 +0530 Subject: [PATCH] fixed modal form issue --- web/components/issues/form.tsx | 39 ++++++++++++++-------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/web/components/issues/form.tsx b/web/components/issues/form.tsx index 23ab8e7d3..881619d65 100644 --- a/web/components/issues/form.tsx +++ b/web/components/issues/form.tsx @@ -379,30 +379,23 @@ export const IssueForm: FC = (props) => { { - if (!value && !watch("description_html")) return <>; - - return ( + render={({ field: { value, onChange } }) => ( { - onChange(description_html); - setValue("description", description); - }} - /> - ); - }} + uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)} + deleteFile={fileService.deleteImage} + ref={editorRef} + debouncedUpdatesEnabled={false} + value={!value || + value === "" || + (typeof value === "object" && Object.keys(value).length === 0) + ? watch("description_html") + : value} + customClassName="min-h-[150px]" + onChange={(description: Object, description_html: string) => { + onChange(description_html); + setValue("description", description); + } } /> + )} />