fix: issue modal title textfield reset (#651)

This commit is contained in:
Saheb Giri 2023-03-31 16:04:51 +05:30 committed by GitHub
parent e5507651c3
commit a6f306209d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,6 +94,7 @@ export const IssueForm: FC<IssueFormProps> = ({
reset, reset,
watch, watch,
control, control,
getValues,
setValue, setValue,
setFocus, setFocus,
} = useForm<IIssue>({ } = useForm<IIssue>({
@ -272,7 +273,11 @@ export const IssueForm: FC<IssueFormProps> = ({
/> />
<GptAssistantModal <GptAssistantModal
isOpen={gptAssistantModal} isOpen={gptAssistantModal}
handleClose={() => 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" inset="top-2 left-0"
content="" content=""
htmlContent={watch("description_html")} htmlContent={watch("description_html")}