Skip to content

Commit 111391a

Browse files
committed
chore(*): resolving further column and width issues
1 parent 6002ee0 commit 111391a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

projects/igniteui-angular/src/lib/grids/columns/column-group.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ export class IgxColumnGroupComponent extends IgxColumnComponent implements After
163163
if (this.headTemplate && this.headTemplate.length) {
164164
this._headerTemplate = this.headTemplate.toArray()[0].template;
165165
}
166-
// Delete the line below once we update to Angular 9
167-
this.children.reset(this.children.toArray().slice(1));
168166
this.children.forEach(child => {
169167
child.parent = this;
170168
});

projects/igniteui-angular/src/lib/grids/columns/column.component.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,12 @@ export class IgxColumnComponent implements AfterContentInit {
312312
this._calcWidth = null;
313313
this.calcPixelWidth = NaN;
314314
this.widthSetByUser = true;
315-
this._width = typeof(value) === 'number' ? value + 'px' : value;
315+
// width could be passed as number from the template
316+
// host bindings are not px affixed so we need to ensure we affix simple number strings
317+
if (typeof(value) === 'number' || value.match(/^[0-9]*$/)) {
318+
value = value + 'px';
319+
}
320+
this._width = value;
316321
if (this.grid) {
317322
this.cacheCalcWidth();
318323
}

0 commit comments

Comments
 (0)