Skip to content
This repository has been archived by the owner on Dec 25, 2021. It is now read-only.

Commit

Permalink
Merge pull request #36 from Samuel-Ayvazyan/master
Browse files Browse the repository at this point in the history
Fix resize for columns with initially configured width.
  • Loading branch information
brunano21 authored Jul 4, 2018
2 parents 364ce75 + fe9a66b commit 0e63c52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/datatable/src/components/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ export class DataTableComponent implements DataTableParams, OnInit, AfterContent

private resizeColumnStart(event: MouseEvent, column: DataTableColumnDirective, columnElement: HTMLElement) {
this._resizeInProgress = true;

let startOffset = columnElement.offsetWidth - event.pageX;
drag(event, {
move: (moveEvent: MouseEvent, dx: number) => {
if (this._isResizeInLimit(columnElement, dx)) {
column.width = columnElement.offsetWidth + dx;
column.width = startOffset + moveEvent.pageX + dx;
}
},
});
Expand Down

0 comments on commit 0e63c52

Please sign in to comment.