Skip to content

Commit

Permalink
Refactor #10396
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Jul 13, 2021
1 parent 08b514c commit 44826b8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1870,12 +1870,14 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
for (let child of children) {
for (let row of child.children) {
let resizeCell = row.children[colIndex];
resizeCell.style.flex = '0 0 ' + newColumnWidth + 'px';
if (resizeCell) {
resizeCell.style.flex = '0 0 ' + newColumnWidth + 'px';

if (this.columnResizeMode === 'fit') {
let nextCell = resizeCell.nextElementSibling;
if (nextCell) {
nextCell.style.flex = '0 0 ' + nextColumnWidth + 'px';
if (this.columnResizeMode === 'fit') {
let nextCell = resizeCell.nextElementSibling;
if (nextCell) {
nextCell.style.flex = '0 0 ' + nextColumnWidth + 'px';
}
}
}
}
Expand Down Expand Up @@ -2266,7 +2268,7 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
}

updateScrollWidth() {
if (this.tableHeaderViewChild && this.tableHeaderViewChild.nativeElement) {
if (this.tableViewChild && this.tableViewChild.nativeElement) {
this.tableViewChild.nativeElement.style.width = this.tableViewChild.nativeElement.scrollWidth + 'px';
}
}
Expand Down

0 comments on commit 44826b8

Please sign in to comment.