Skip to content

Commit

Permalink
test next element minWidth when resizing a column
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent committed Dec 7, 2017
1 parent 809607c commit 84589f9
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 84589f9

Please sign in to comment.