Skip to content

Commit e03fca7

Browse files
MKirovaMKirova
authored andcommitted
fix(igxGrid): When col size is % round calculations for when to show hScrollbar.
1 parent bb28024 commit e03fca7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5525,7 +5525,7 @@ export abstract class IgxGridBaseDirective implements GridType,
55255525
let sum = 0;
55265526
for (const col of fc) {
55275527
if (col.level === 0) {
5528-
sum += parseInt(col.calcWidth, 10);
5528+
sum += parseFloat(col.calcWidth);
55295529
}
55305530
}
55315531
if (this.isPinningToStart) {
@@ -6266,7 +6266,7 @@ export abstract class IgxGridBaseDirective implements GridType,
62666266
* @hidden @internal
62676267
*/
62686268
public hasHorizontalScroll() {
6269-
return this.totalWidth - this.unpinnedWidth > 0 && this.width !== null;
6269+
return Math.round(this.totalWidth - this.unpinnedWidth) > 0 && this.width !== null;
62706270
}
62716271

62726272
/**

0 commit comments

Comments
 (0)