From e4a3d0db5c75eb232ef27bf6d950e52d5c282749 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 25 Jan 2024 14:09:52 +0530 Subject: [PATCH] fix: addIssue function logic (#3467) --- web/components/dropdowns/types.d.ts | 1 + web/store/issue/issue-details/issue.store.ts | 1 + web/store/issue/issue.store.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/web/components/dropdowns/types.d.ts b/web/components/dropdowns/types.d.ts index f9a078382..b99369022 100644 --- a/web/components/dropdowns/types.d.ts +++ b/web/components/dropdowns/types.d.ts @@ -18,5 +18,6 @@ export type TDropdownProps = { placeholder?: string; placement?: Placement; tabIndex?: number; + // TODO: rename this prop to showTooltip tooltip?: boolean; }; diff --git a/web/store/issue/issue-details/issue.store.ts b/web/store/issue/issue-details/issue.store.ts index bc34af0f6..284e5d201 100644 --- a/web/store/issue/issue-details/issue.store.ts +++ b/web/store/issue/issue-details/issue.store.ts @@ -90,6 +90,7 @@ export class IssueStore implements IIssueStore { this.rootIssueDetailStore.relation.fetchRelations(workspaceSlug, projectId, issueId); // fetching states + // TODO: check if this function is required this.rootIssueDetailStore.rootIssueStore.state.fetchProjectStates(workspaceSlug, projectId); return issue; diff --git a/web/store/issue/issue.store.ts b/web/store/issue/issue.store.ts index f31c8f2f6..8ee689daf 100644 --- a/web/store/issue/issue.store.ts +++ b/web/store/issue/issue.store.ts @@ -43,7 +43,7 @@ export class IssueStore implements IIssueStore { if (issues && issues.length <= 0) return; runInAction(() => { issues.forEach((issue) => { - set(this.issuesMap, issue.id, issue); + if (!this.issuesMap[issue.id]) set(this.issuesMap, issue.id, issue); }); }); };