Skip to content

Commit

Permalink
table colum resize directive works better
Browse files Browse the repository at this point in the history
  • Loading branch information
chinonso098 committed Oct 13, 2024
1 parent 0bd8628 commit 61b2095
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ export class ColumnResizeDirective {
const newWidth = this.initialWidth + deltaX;

// Update the width of the current column
this.renderer.setStyle(this.el.nativeElement, 'min-width', newWidth + 'px');
this.renderer.setStyle(this.el.nativeElement, 'width', newWidth + 'px');

// Update the width of the corresponding header and cell in each row
columns[this.columnIndex].style.minWidth = `${newWidth}px`;
columns[this.columnIndex].style.width = `${newWidth}px`;

const rows = this.table?.querySelectorAll('tr');
Expand Down

0 comments on commit 61b2095

Please sign in to comment.