Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculating grid's width when initialized with % based on its offsetWidth in IE11 (6.2.x) #3098

Merged
merged 8 commits into from
Nov 27, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -3489,7 +3489,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