Skip to content

Commit e4a9cb5

Browse files
committed
fix(resizing): update the getter to use width from the computed styles
1 parent 936d00a commit e4a9cb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/igniteui-angular/src/lib/grids/resizing/resizing.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class IgxColumnResizingService {
3535
* @hidden
3636
*/
3737
public getColumnHeaderRenderedWidth() {
38-
return this.column.headerCell.nativeElement.getBoundingClientRect().width;
38+
return parseFloat(window.getComputedStyle(this.column.headerCell.nativeElement).width);
3939
}
4040

4141
/**
@@ -61,7 +61,7 @@ export class IgxColumnResizingService {
6161
* Returns the minimal possible width to which the column can be resized.
6262
*/
6363
public get restrictResizeMin(): number {
64-
const actualWidth = parseFloat(window.getComputedStyle(this.column.headerCell.nativeElement).width);
64+
const actualWidth = this.getColumnHeaderRenderedWidth();
6565
const minWidth = this.column.minWidthPx < actualWidth ? this.column.minWidthPx : actualWidth;
6666

6767
return actualWidth - minWidth;
@@ -71,7 +71,7 @@ export class IgxColumnResizingService {
7171
* Returns the maximal possible width to which the column can be resized.
7272
*/
7373
public get restrictResizeMax(): number {
74-
const actualWidth = parseFloat(window.getComputedStyle(this.column.headerCell.nativeElement).width);
74+
const actualWidth = this.getColumnHeaderRenderedWidth();
7575
const maxWidth = this.column.maxWidthPx;
7676
if (this.column.maxWidth) {
7777
return maxWidth - actualWidth;

0 commit comments

Comments
 (0)