Skip to content

Commit eca2d0f

Browse files
authored
Merge pull request #15886 from IgniteUI/mkirova/fix-hor-scrollbar-calc-master
fix(igxGrid): When col size is % round calculations for when to show …
2 parents 7e40671 + e03fca7 commit eca2d0f

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
@@ -5557,7 +5557,7 @@ export abstract class IgxGridBaseDirective implements GridType,
55575557
let sum = 0;
55585558
for (const col of fc) {
55595559
if (col.level === 0) {
5560-
sum += parseInt(col.calcWidth, 10);
5560+
sum += parseFloat(col.calcWidth);
55615561
}
55625562
}
55635563
if (this.isPinningToStart) {
@@ -6298,7 +6298,7 @@ export abstract class IgxGridBaseDirective implements GridType,
62986298
* @hidden @internal
62996299
*/
63006300
public hasHorizontalScroll() {
6301-
return this.totalWidth - this.unpinnedWidth > 0 && this.width !== null;
6301+
return Math.round(this.totalWidth - this.unpinnedWidth) > 0 && this.width !== null;
63026302
}
63036303

63046304
/**

0 commit comments

Comments
 (0)