Skip to content

Commit db618f6

Browse files
Mihran MargaryanMihran Margaryan
authored andcommitted
added an inline comment explaining freezeColumnsLeft and freezeColumnsRight
1 parent 2a97994 commit db618f6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/internal/data-grid/render/data-grid-lib.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export function useMappedColumns(
2424
columns: readonly InnerGridColumn[],
2525
freezeColumns: number | [left: number, right: number]
2626
): readonly MappedGridColumn[] {
27+
// Extract freeze column counts from the union type parameter. freezeColumnsLeft and freezeColumnsRight
28+
// determine which columns should remain sticky at the left and right sides respectively during horizontal scrolling.
2729
const freezeColumnsLeft = typeof freezeColumns === "number" ? freezeColumns : freezeColumns[0];
2830
const freezeColumnsRight = typeof freezeColumns === "number" ? 0 : freezeColumns[1];
2931

0 commit comments

Comments
 (0)