From 58ac1dcba14033b93b70243fdd38ab658c6915da Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Fri, 10 Jan 2025 14:30:24 +0530 Subject: [PATCH] [WEB-2924] improvement: enhance spreadsheet modularity for improved global compatibility (#6374) --- .../spreadsheet/base-spreadsheet-root.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx b/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx index 5a681fd8330..377c8f96f94 100644 --- a/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx +++ b/web/core/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx @@ -1,7 +1,7 @@ import { FC, useCallback, useEffect } from "react"; import { observer } from "mobx-react"; import { useParams } from "next/navigation"; -// plane constants +// plane imports import { ALL_ISSUES, EIssueLayoutTypes, EIssuesStoreType, EIssueFilterType } from "@plane/constants"; import { IIssueDisplayFilterOptions } from "@plane/types"; // hooks @@ -9,12 +9,8 @@ import { useIssues, useUserPermissions } from "@/hooks/store"; import { useIssueStoreType } from "@/hooks/use-issue-layout-store"; import { useIssuesActions } from "@/hooks/use-issues-actions"; import { EUserPermissions, EUserPermissionsLevel } from "@/plane-web/constants/user-permissions"; -// views -// stores -// components +// local imports import { IssueLayoutHOC } from "../issue-layout-HOC"; -// types -// constants import { IQuickActionProps, TRenderQuickActions } from "../list/list-view-types"; import { SpreadsheetView } from "./spreadsheet-view"; @@ -81,9 +77,7 @@ export const BaseSpreadsheetRoot = observer((props: IBaseSpreadsheetRoot) => { const handleDisplayFiltersUpdate = useCallback( (updatedDisplayFilter: Partial) => { - if (!projectId) return; - - updateFilters(projectId.toString(), EIssueFilterType.DISPLAY_FILTERS, { + updateFilters(projectId?.toString() ?? "", EIssueFilterType.DISPLAY_FILTERS, { ...updatedDisplayFilter, }); },