Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

[WEB-848] fix: issue with parent child relation not being removed parent select dropwdown. (#4120)

Prateek Shourya4cba7ff2f5e7
diff --git a/web/components/issues/issue-modal/form.tsx b/web/components/issues/issue-modal/form.tsx
index 88d6c38778..235d33b5f2 100644
--- a/web/components/issues/issue-modal/form.tsx
+++ b/web/components/issues/issue-modal/form.tsx
@@ -684,15 +684,21 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
<CustomMenu.MenuItem className="!p-1" onClick={() => setParentIssueListModalOpen(true)}>
Change parent issue
</CustomMenu.MenuItem>
- <CustomMenu.MenuItem
- className="!p-1"
- onClick={() => {
- setValue("parent_id", null);
- handleFormChange();
- }}
- >
- Remove parent issue
- </CustomMenu.MenuItem>
+ <Controller
+ control={control}
+ name="parent_id"
+ render={({ field: { onChange } }) => (
+ <CustomMenu.MenuItem
+ className="!p-1"
+ onClick={() => {
+ onChange(null);
+ handleFormChange();
+ }}
+ >
+ Remove parent issue
+ </CustomMenu.MenuItem>
+ )}
+ />
</>
</CustomMenu>
) : (