Skip to content

Commit 652a7f2

Browse files
committed
chore(*): Fix columnWidth as number scenario
1 parent eb981ee commit 652a7f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4840,6 +4840,9 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
48404840
*/
48414841
protected getExtremumBasedColWidth(column: IgxColumnComponent): string {
48424842
let width = this._columnWidth;
4843+
if (width && typeof width !== 'string') {
4844+
width = String(width);
4845+
}
48434846
const minWidth = this._columnWidth.indexOf('%') === -1 ? column.minWidthPx : column.minWidthPercent;
48444847
const maxWidth = this._columnWidth.indexOf('%') === -1 ? column.maxWidthPx : column.maxWidthPercent;
48454848
if (column.hidden) {
@@ -4852,9 +4855,6 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
48524855
width = column.maxWidth;
48534856
}
48544857

4855-
if (width && typeof width !== 'string') {
4856-
width = String(width);
4857-
}
48584858
// if no px or % are defined in maxWidth/minWidth consider it px
48594859
if (width.indexOf('%') === -1 && width.indexOf('px') === -1) {
48604860
width += 'px';

0 commit comments

Comments
 (0)