Skip to content

Commit 0529640

Browse files
author
Mihran Margaryan
committed
fix vertical lines calculation issue
1 parent 6ec6036 commit 0529640

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ export function drawGridLines(
317317
}
318318
ctx.clip("evenodd");
319319
}
320+
321+
const effectiveWidth = effectiveCols.reduce((acc, col) => acc + col.width, 0);
320322
const hColor = theme.horizontalBorderColor ?? theme.borderColor;
321323
const vColor = theme.borderColor;
322324

@@ -345,6 +347,7 @@ export function drawGridLines(
345347
}
346348
}
347349

350+
width = Math.min(width, effectiveWidth);
348351
let rightX = width + 0.5;
349352
for (let index = effectiveCols.length - 1; index >= 0; index--) {
350353
const c = effectiveCols[index];

0 commit comments

Comments
 (0)