Skip to content

Commit

Permalink
Merge pull request #4625 from vincent/master
Browse files Browse the repository at this point in the history
Test next element minWidth when resizing a column.
  • Loading branch information
cagataycivici authored Dec 20, 2017
2 parents c3b6a7e + 84589f9 commit cea6c42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/components/datatable/datatable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2197,8 +2197,9 @@ export class DataTable implements AfterViewChecked,AfterViewInit,AfterContentIni
if(this.columnResizeMode === 'fit') {
let nextColumn = this.resizeColumn.nextElementSibling;
let nextColumnWidth = nextColumn.offsetWidth - delta;

if(newColumnWidth > 15 && nextColumnWidth > 15) {
let nextColumnMinWidth = nextColumn.style.minWidth||15;

if(newColumnWidth > 15 && nextColumnWidth > parseInt(nextColumnMinWidth)) {
this.resizeColumn.style.width = newColumnWidth + 'px';
if(nextColumn) {
nextColumn.style.width = nextColumnWidth + 'px';
Expand Down

0 comments on commit cea6c42

Please sign in to comment.