From 6eb7c031f0c12ccaccb86c77143096774146a21f Mon Sep 17 00:00:00 2001 From: rahulramesha Date: Fri, 20 Sep 2024 14:29:12 +0530 Subject: [PATCH] change kanban group virtualization logic --- web/core/components/core/render-if-visible-HOC.tsx | 2 +- web/core/components/issues/issue-layouts/kanban/default.tsx | 2 +- web/core/components/issues/issue-layouts/list/block-root.tsx | 3 --- web/core/components/issues/issue-layouts/list/blocks-list.tsx | 1 - .../components/issues/issue-layouts/spreadsheet/issue-row.tsx | 3 --- .../issues/issue-layouts/spreadsheet/spreadsheet-table.tsx | 1 - 6 files changed, 2 insertions(+), 10 deletions(-) diff --git a/web/core/components/core/render-if-visible-HOC.tsx b/web/core/components/core/render-if-visible-HOC.tsx index 0b30fb22bf4..3e697a53d9c 100644 --- a/web/core/components/core/render-if-visible-HOC.tsx +++ b/web/core/components/core/render-if-visible-HOC.tsx @@ -75,7 +75,7 @@ const RenderIfVisible: React.FC = (props) => { }, [isVisible, intersectionRef, shouldRecordHeights]); const child = isVisible ? <>{children} : placeholderChildren; - const style = isVisible || placeholderChildren ? {} : { height: placeholderHeight.current, width: "100%" }; + const style = isVisible || !shouldRecordHeights ? {} : { height: placeholderHeight.current, width: "100%" }; const className = isVisible || placeholderChildren ? classNames : cn(classNames, "bg-custom-background-80"); return React.createElement(as, { ref: intersectionRef, style, className }, child); diff --git a/web/core/components/issues/issue-layouts/kanban/default.tsx b/web/core/components/issues/issue-layouts/kanban/default.tsx index 9a92894df03..76c18102306 100644 --- a/web/core/components/issues/issue-layouts/kanban/default.tsx +++ b/web/core/components/issues/issue-layouts/kanban/default.tsx @@ -183,7 +183,7 @@ export const KanBan: React.FC = observer((props) => { {groupByVisibilityToggle.showIssues && ( ) => Promise) | undefined; @@ -44,7 +43,6 @@ type Props = { export const IssueBlockRoot: FC = observer((props) => { const { - issueIds, issueId, issuesMap, groupId, @@ -161,7 +159,6 @@ export const IssueBlockRoot: FC = observer((props) => { subIssues?.map((subIssueId) => ( = (props) => { issueIds.map((issueId: string, index: number) => ( ; containerRef: MutableRefObject; - issueIds: string[]; spreadsheetColumnsList: (keyof IIssueDisplayProperties)[]; spacingLeft?: number; selectionHelpers: TSelectionHelper; @@ -57,7 +56,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => { canEditProperties, isScrolled, containerRef, - issueIds, spreadsheetColumnsList, spacingLeft = 6, selectionHelpers, @@ -124,7 +122,6 @@ export const SpreadsheetIssueRow = observer((props: Props) => { portalElement={portalElement} isScrolled={isScrolled} containerRef={containerRef} - issueIds={issueIds} spreadsheetColumnsList={spreadsheetColumnsList} selectionHelpers={selectionHelpers} /> diff --git a/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsx b/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsx index 58e54334e71..2bf3ce3658b 100644 --- a/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsx +++ b/web/core/components/issues/issue-layouts/spreadsheet/spreadsheet-table.tsx @@ -125,7 +125,6 @@ export const SpreadsheetTable = observer((props: Props) => { portalElement={portalElement} containerRef={containerRef} isScrolled={isScrolled} - issueIds={issueIds} spreadsheetColumnsList={spreadsheetColumnsList} selectionHelpers={selectionHelpers} />