Skip to content

Commit

Permalink
ensure that auto column resize on double click get counted as a user …
Browse files Browse the repository at this point in the history
…choice
  • Loading branch information
olifolkerd committed Jan 19, 2025
1 parent 76b6946 commit 48ee66a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
14 changes: 9 additions & 5 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2968,10 +2968,15 @@ class Column extends CoreFeature{

if(maxWidth){
var setTo = maxWidth + 1;
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);

if(force){
this.setWidth(setTo);
}else {
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);
}
this.setWidthActual(setTo);
}
this.setWidthActual(setTo);
}
}
}
Expand Down Expand Up @@ -5263,7 +5268,6 @@ class Download extends Module{
this.registerTableOption("downloadEncoder", function(data, mimeType){
return new Blob([data],{type:mimeType});
}); //function to manipulate download data
// this.registerTableOption("downloadReady", undefined); //warn of function deprecation
this.registerTableOption("downloadConfig", {}); //download config
this.registerTableOption("downloadRowRange", "active"); //restrict download to active rows only

Expand All @@ -5279,7 +5283,7 @@ class Download extends Module{
}

deprecatedOptionsCheck(){
// this.deprecationCheck("downloadReady", "downloadEncoder");

}

///////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.js.map

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions dist/js/tabulator_esm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2968,10 +2968,15 @@ class Column extends CoreFeature{

if(maxWidth){
var setTo = maxWidth + 1;
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);

if(force){
this.setWidth(setTo);
}else {
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);
}
this.setWidthActual(setTo);
}
this.setWidthActual(setTo);
}
}
}
Expand Down Expand Up @@ -5263,7 +5268,6 @@ class Download extends Module{
this.registerTableOption("downloadEncoder", function(data, mimeType){
return new Blob([data],{type:mimeType});
}); //function to manipulate download data
// this.registerTableOption("downloadReady", undefined); //warn of function deprecation
this.registerTableOption("downloadConfig", {}); //download config
this.registerTableOption("downloadRowRange", "active"); //restrict download to active rows only

Expand All @@ -5279,7 +5283,7 @@ class Download extends Module{
}

deprecatedOptionsCheck(){
// this.deprecationCheck("downloadReady", "downloadEncoder");

}

///////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion dist/js/tabulator_esm.mjs.map

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions src/js/core/column/Column.js
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,15 @@ export default class Column extends CoreFeature{

if(maxWidth){
var setTo = maxWidth + 1;
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);

if(force){
this.setWidth(setTo);
}else{
if (this.maxInitialWidth && !force) {
setTo = Math.min(setTo, this.maxInitialWidth);
}
this.setWidthActual(setTo);
}
this.setWidthActual(setTo);
}
}
}
Expand Down

0 comments on commit 48ee66a

Please sign in to comment.