Skip to content

Commit 261f417

Browse files
committed
fix(IgxGrid): set calcWidth or defaultWidth when grid width is null #6173
1 parent d0ef6e7 commit 261f417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4655,7 +4655,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
46554655
cols.forEach((item) => {
46564656
const isWidthInPercent = item.width && typeof item.width === 'string' && item.width.indexOf('%') !== -1;
46574657
if (isWidthInPercent) {
4658-
item.width = MINIMUM_COLUMN_WIDTH + 'px';
4658+
item.width = item.calcWidth || MINIMUM_COLUMN_WIDTH + 'px';
46594659
}
46604660
colSum += parseInt((item.width || item.defaultWidth), 10) || MINIMUM_COLUMN_WIDTH;
46614661
});

0 commit comments

Comments
 (0)