[WEB-848] fix: issue with parent child relation not being removed from update issue modal. (#4103)

This commit is contained in:
Prateek Shourya 2024-04-03 18:01:11 +05:30 committed by GitHub
parent 204e4a8c6d
commit fed5916907
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -327,6 +327,10 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
</h3> </h3>
</div> </div>
{watch("parent_id") && selectedParentIssue && ( {watch("parent_id") && selectedParentIssue && (
<Controller
control={control}
name="parent_id"
render={({ field: { onChange } }) => (
<div className="flex w-min items-center gap-2 whitespace-nowrap rounded bg-custom-background-80 p-2 text-xs"> <div className="flex w-min items-center gap-2 whitespace-nowrap rounded bg-custom-background-80 p-2 text-xs">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<span <span
@ -343,7 +347,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
type="button" type="button"
className="grid place-items-center" className="grid place-items-center"
onClick={() => { onClick={() => {
setValue("parent_id", null); onChange(null);
handleFormChange(); handleFormChange();
setSelectedParentIssue(null); setSelectedParentIssue(null);
}} }}
@ -354,6 +358,8 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
</div> </div>
</div> </div>
)} )}
/>
)}
<div className="space-y-3"> <div className="space-y-3">
<div className="mt-2 space-y-3"> <div className="mt-2 space-y-3">
<Controller <Controller