From da160cf4e5d50362d23be7c8e10c52468219a46c Mon Sep 17 00:00:00 2001 From: HristoP96 Date: Wed, 21 Nov 2018 19:13:08 +0200 Subject: [PATCH] fix(grid): Calculating grid's width based on its offsetWidth in IE11 #3097 --- .../igniteui-angular/src/lib/grids/grid-base.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts index 67257c29f62..b3780850ccb 100644 --- a/projects/igniteui-angular/src/lib/grids/grid-base.component.ts +++ b/projects/igniteui-angular/src/lib/grids/grid-base.component.ts @@ -3453,7 +3453,10 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements if (this._width && this._width.indexOf('%') !== -1) { /* width in %*/ - const width = parseInt(computed.getPropertyValue('width'), 10); + const width = computed.getPropertyValue('width').indexOf('%') === -1 ? + parseInt(computed.getPropertyValue('width'), 10) : + this.document.getElementById(this.nativeElement.id).offsetWidth; + if (Number.isFinite(width) && width !== this.calcWidth) { this.calcWidth = width;