forked from github/plane
[WEB-848] fix: issue with parent child relation not being removed from update issue modal. (#4103)
This commit is contained in:
parent
204e4a8c6d
commit
fed5916907
@ -327,32 +327,38 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
{watch("parent_id") && selectedParentIssue && (
|
{watch("parent_id") && selectedParentIssue && (
|
||||||
<div className="flex w-min items-center gap-2 whitespace-nowrap rounded bg-custom-background-80 p-2 text-xs">
|
<Controller
|
||||||
<div className="flex items-center gap-2">
|
control={control}
|
||||||
<span
|
name="parent_id"
|
||||||
className="block h-1.5 w-1.5 rounded-full"
|
render={({ field: { onChange } }) => (
|
||||||
style={{
|
<div className="flex w-min items-center gap-2 whitespace-nowrap rounded bg-custom-background-80 p-2 text-xs">
|
||||||
backgroundColor: selectedParentIssue.state__color,
|
<div className="flex items-center gap-2">
|
||||||
}}
|
<span
|
||||||
/>
|
className="block h-1.5 w-1.5 rounded-full"
|
||||||
<span className="flex-shrink-0 text-custom-text-200">
|
style={{
|
||||||
{selectedParentIssue.project__identifier}-{selectedParentIssue.sequence_id}
|
backgroundColor: selectedParentIssue.state__color,
|
||||||
</span>
|
}}
|
||||||
<span className="truncate font-medium">{selectedParentIssue.name.substring(0, 50)}</span>
|
/>
|
||||||
<button
|
<span className="flex-shrink-0 text-custom-text-200">
|
||||||
type="button"
|
{selectedParentIssue.project__identifier}-{selectedParentIssue.sequence_id}
|
||||||
className="grid place-items-center"
|
</span>
|
||||||
onClick={() => {
|
<span className="truncate font-medium">{selectedParentIssue.name.substring(0, 50)}</span>
|
||||||
setValue("parent_id", null);
|
<button
|
||||||
handleFormChange();
|
type="button"
|
||||||
setSelectedParentIssue(null);
|
className="grid place-items-center"
|
||||||
}}
|
onClick={() => {
|
||||||
tabIndex={getTabIndex("remove_parent")}
|
onChange(null);
|
||||||
>
|
handleFormChange();
|
||||||
<X className="h-3 w-3 cursor-pointer" />
|
setSelectedParentIssue(null);
|
||||||
</button>
|
}}
|
||||||
</div>
|
tabIndex={getTabIndex("remove_parent")}
|
||||||
</div>
|
>
|
||||||
|
<X className="h-3 w-3 cursor-pointer" />
|
||||||
|
</button>
|
||||||
|
</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">
|
||||||
|
Loading…
Reference in New Issue
Block a user