Skip to content

Commit

Permalink
reinitialize data tree child rows on forced table redraw
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed May 1, 2022
1 parent ea0514e commit efbb119
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4138,11 +4138,24 @@ class DataTree extends Module{
this.subscribe("edit-cancelled", this.cellValueChanged.bind(this));
this.subscribe("column-moving-rows", this.columnMoving.bind(this));
this.subscribe("table-built", this.initializeElementField.bind(this));
this.subscribe("table-redrawing", this.tableRedrawing.bind(this));

this.registerDisplayHandler(this.getRows.bind(this), 30);
}
}

tableRedrawing(force){
var rows;

if(force){
rows = this.table.rowManager.getRows();

rows.forEach((row) => {
this.reinitializeRowChildren(row);
});
}
}

initializeElementField(){
var firstCol = this.table.columnManager.getFirstVisibleColumn();

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

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/js/modules/DataTree/DataTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,24 @@ class DataTree extends Module{
this.subscribe("edit-cancelled", this.cellValueChanged.bind(this));
this.subscribe("column-moving-rows", this.columnMoving.bind(this));
this.subscribe("table-built", this.initializeElementField.bind(this));
this.subscribe("table-redrawing", this.tableRedrawing.bind(this));

this.registerDisplayHandler(this.getRows.bind(this), 30);
}
}

tableRedrawing(force){
var rows;

if(force){
rows = this.table.rowManager.getRows();

rows.forEach((row) => {
this.reinitializeRowChildren(row);
});
}
}

initializeElementField(){
var firstCol = this.table.columnManager.getFirstVisibleColumn();

Expand Down

0 comments on commit efbb119

Please sign in to comment.