Skip to content

Commit

Permalink
Merge pull request #1 from HosseinGhojavand3704/Resizable-Table-Primeng
Browse files Browse the repository at this point in the history
feat: Handel Rtl Resizable Table Primeng
  • Loading branch information
mehrabisajad authored Jul 30, 2024
2 parents 63b595e + 43aad6f commit ab3b115
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/components/table/table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2506,7 +2506,9 @@ export class Table implements OnInit, AfterViewInit, AfterContentInit, Blockable
}

onColumnResizeEnd() {
let delta = this.resizeHelperViewChild?.nativeElement.offsetLeft - <number>this.lastResizerHelperX;
const isRTL = DomHandler.isRTL(this.containerViewChild?.nativeElement);
let delta= this.resizeHelperViewChild?.nativeElement.offsetLeft - <number>this.lastResizerHelperX;
if (isRTL) delta *= -1;
let columnWidth = this.resizeColumnElement.offsetWidth;
let newColumnWidth = columnWidth + delta;
let minWidth = this.resizeColumnElement.style.minWidth.replace(/[^\d.]/g, '') || 15;
Expand Down

0 comments on commit ab3b115

Please sign in to comment.