From f4cc103238456786a495daab4d2ad5d5e18dbe22 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 3 May 2024 17:58:15 +0530 Subject: [PATCH] [WEB-1175] fix: modal context (#4352) * fix: modal context * chore: code refactor --- .../issues/issue-detail/parent-select.tsx | 8 ++-- .../issues/issue-detail/relation-select.tsx | 14 ++++-- .../issues/peek-overview/header.tsx | 4 +- web/components/issues/peek-overview/view.tsx | 4 +- web/components/issues/sub-issues/root.tsx | 6 +-- web/store/issue/issue-details/root.store.ts | 46 +++++++++++-------- 6 files changed, 46 insertions(+), 36 deletions(-) diff --git a/web/components/issues/issue-detail/parent-select.tsx b/web/components/issues/issue-detail/parent-select.tsx index a60131de4b..a51d0c569d 100644 --- a/web/components/issues/issue-detail/parent-select.tsx +++ b/web/components/issues/issue-detail/parent-select.tsx @@ -47,7 +47,7 @@ export const IssueParentSelect: React.FC = observer((props) try { await issueOperations.update(workspaceSlug, projectId, issueId, { parent_id: _issueId }); await issueOperations.fetch(workspaceSlug, projectId, issueId); - toggleParentIssueModal(false); + toggleParentIssueModal(issueId); } catch (error) { console.error("something went wrong while fetching the issue"); } @@ -79,8 +79,8 @@ export const IssueParentSelect: React.FC = observer((props) toggleParentIssueModal(false)} + isOpen={isParentIssueModalOpen === issueId} + handleClose={() => toggleParentIssueModal(null)} onChange={(issue: any) => handleParentIssue(issue?.id)} />