From 13274e8d8178ac264510115c61f6eca21a343061 Mon Sep 17 00:00:00 2001 From: Rajat Date: Mon, 2 Sep 2024 11:44:41 +0530 Subject: [PATCH 1/5] CleanUp:Remove minFirstColumn --- .../features/columnHeaders/useGridColumnHeaders.tsx | 3 --- .../features/columnHeaders/useGridColumnHeaders.tsx | 13 ++----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx b/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx index ced989772a6b..dd09528419a0 100644 --- a/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid-pro/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -166,19 +166,16 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { getColumnFilters({ position: GridPinnedColumnPosition.LEFT, renderContext: leftRenderContext, - minFirstColumn: leftRenderContext.firstColumnIndex, maxLastColumn: leftRenderContext.lastColumnIndex, })} {getColumnFilters({ renderContext, - minFirstColumn: pinnedColumns.left.length, maxLastColumn: visibleColumns.length - pinnedColumns.right.length, })} {rightRenderContext && getColumnFilters({ position: GridPinnedColumnPosition.RIGHT, renderContext: rightRenderContext, - minFirstColumn: rightRenderContext.firstColumnIndex, maxLastColumn: rightRenderContext.lastColumnIndex, })} diff --git a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx index ff711ab42c48..b81b4a0a9663 100644 --- a/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx +++ b/packages/x-data-grid/src/hooks/features/columnHeaders/useGridColumnHeaders.tsx @@ -64,7 +64,6 @@ export interface UseGridColumnHeadersProps { export interface GetHeadersParams { position?: GridPinnedColumnPosition; renderContext?: GridColumnsRenderContext; - minFirstColumn?: number; maxLastColumn?: number; } @@ -161,11 +160,8 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { // Helper for computation common between getColumnHeaders and getColumnGroupHeaders const getColumnsToRender = (params?: GetHeadersParams) => { - const { - renderContext: currentContext = renderContext, - // TODO: `minFirstColumn` is not used anymore, could be refactored out. - maxLastColumn = visibleColumns.length, - } = params || {}; + const { renderContext: currentContext = renderContext, maxLastColumn = visibleColumns.length } = + params || {}; const firstColumnToRender = currentContext.firstColumnIndex; const lastColumnToRender = !hasVirtualization ? maxLastColumn : currentContext.lastColumnIndex; @@ -314,14 +310,12 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { { position: GridPinnedColumnPosition.LEFT, renderContext: leftRenderContext, - minFirstColumn: leftRenderContext.firstColumnIndex, maxLastColumn: leftRenderContext.lastColumnIndex, }, { disableReorder: true }, )} {getColumnHeaders({ renderContext, - minFirstColumn: pinnedColumns.left.length, maxLastColumn: visibleColumns.length - pinnedColumns.right.length, })} {rightRenderContext && @@ -329,7 +323,6 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { { position: GridPinnedColumnPosition.RIGHT, renderContext: rightRenderContext, - minFirstColumn: rightRenderContext.firstColumnIndex, maxLastColumn: rightRenderContext.lastColumnIndex, }, { @@ -482,7 +475,6 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { params: { position: GridPinnedColumnPosition.LEFT, renderContext: leftRenderContext, - minFirstColumn: leftRenderContext.firstColumnIndex, maxLastColumn: leftRenderContext.lastColumnIndex, }, })} @@ -493,7 +485,6 @@ export const useGridColumnHeaders = (props: UseGridColumnHeadersProps) => { params: { position: GridPinnedColumnPosition.RIGHT, renderContext: rightRenderContext, - minFirstColumn: rightRenderContext.firstColumnIndex, maxLastColumn: rightRenderContext.lastColumnIndex, }, })} From 25dc9145a36af04e42edf9dea822e2a5790f2031 Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Tue, 17 Sep 2024 00:21:25 -0400 Subject: [PATCH 2/5] ci: run (empty commit) From ddf538fc978f625dc0f321f8b873f61a866e769b Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Tue, 17 Sep 2024 00:53:53 -0400 Subject: [PATCH 3/5] ci: run (empty commit) From 31519fed1b53ae196b52ffac3c8832d030ee618f Mon Sep 17 00:00:00 2001 From: Rajat Date: Tue, 17 Sep 2024 22:22:16 +0530 Subject: [PATCH 4/5] run ci From f1b5e14b6be49354c880843e559d5e9630a30042 Mon Sep 17 00:00:00 2001 From: Rom Grk Date: Wed, 18 Sep 2024 03:28:18 -0400 Subject: [PATCH 5/5] ci: run (empty commit)