Skip to content

Commit

Permalink
fix(grid): Calculating grid's width based on its offsetWidth in IE11 #…
Browse files Browse the repository at this point in the history
  • Loading branch information
HristoP96 authored and HristoP96 committed Nov 21, 2018
1 parent f1e16ab commit da160cf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit da160cf

Please sign in to comment.