Skip to content

Commit

Permalink
fix issue with Layout module not handling string type numbers on widt…
Browse files Browse the repository at this point in the history
…hGrow and widthShrink options
  • Loading branch information
olifolkerd committed Aug 27, 2023
1 parent 94006b6 commit 15f8161
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25003,6 +25003,16 @@ class Layout extends Module{
}

this.table.element.setAttribute("tabulator-layout", this.mode);
this.subscribe("column-init", this.initializeColumn.bind(this));
}

initializeColumn(column){
if(column.definition.widthGrow){
column.definition.widthGrow = Number(column.definition.widthGrow);
}
if(column.definition.widthShrink){
column.definition.widthShrink = Number(column.definition.widthShrink);
}
}

getMode(){
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js.map

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/js/modules/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ class Layout extends Module{
}

this.table.element.setAttribute("tabulator-layout", this.mode);
this.subscribe("column-init", this.initializeColumn.bind(this));
}

initializeColumn(column){
if(column.definition.widthGrow){
column.definition.widthGrow = Number(column.definition.widthGrow);
}
if(column.definition.widthShrink){
column.definition.widthShrink = Number(column.definition.widthShrink);
}
}

getMode(){
Expand Down

0 comments on commit 15f8161

Please sign in to comment.