From a6f306209d30cb4da65a80dfb5dd2c40a36461af Mon Sep 17 00:00:00 2001 From: Saheb Giri <47132373+iamsahebgiri@users.noreply.github.com> Date: Fri, 31 Mar 2023 16:04:51 +0530 Subject: [PATCH] fix: issue modal title textfield reset (#651) --- apps/app/components/issues/form.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 35cff8472..800630c15 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -94,6 +94,7 @@ export const IssueForm: FC = ({ reset, watch, control, + getValues, setValue, setFocus, } = useForm({ @@ -272,7 +273,11 @@ export const IssueForm: FC = ({ /> setGptAssistantModal(false)} + handleClose={() => { + setGptAssistantModal(false); + // this is done so that the title do not reset after gpt popover closed + reset(getValues()); + }} inset="top-2 left-0" content="" htmlContent={watch("description_html")}