Skip to content

Commit

Permalink
fix issue with row manager display row array management
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed Aug 21, 2022
1 parent 5d5ab85 commit 32c9718
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
17 changes: 3 additions & 14 deletions dist/js/tabulator_esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -22702,7 +22702,7 @@ class RowManager extends CoreFeature{
case "displayPipeline":
for(let i = index; i < this.displayPipeline.length; i++){
let result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);

this.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);
}

Expand Down Expand Up @@ -22745,22 +22745,11 @@ class RowManager extends CoreFeature{

//set display row pipeline data
setDisplayRows(displayRows, index){

var output = true;

if(index && typeof this.displayRows[index] != "undefined"){
this.displayRows[index] = displayRows;
output = true;
}else {
this.displayRows.push(displayRows);
output = index = this.displayRows.length -1;
}

this.displayRows[index] = displayRows;

if(index == this.displayRows.length -1){
this.displayRowsCount = this.displayRows[this.displayRows.length -1].length;
}

return output;
}

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

Large diffs are not rendered by default.

17 changes: 3 additions & 14 deletions src/js/core/RowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ export default class RowManager extends CoreFeature{
case "displayPipeline":
for(let i = index; i < this.displayPipeline.length; i++){
let result = this.displayPipeline[i].handler((i ? this.getDisplayRows(i - 1) : this.activeRows).slice(0), renderInPosition);

this.setDisplayRows(result || this.getDisplayRows(i - 1).slice(0), i);
}

Expand Down Expand Up @@ -755,22 +755,11 @@ export default class RowManager extends CoreFeature{

//set display row pipeline data
setDisplayRows(displayRows, index){

var output = true;

if(index && typeof this.displayRows[index] != "undefined"){
this.displayRows[index] = displayRows;
output = true;
}else{
this.displayRows.push(displayRows);
output = index = this.displayRows.length -1;
}

this.displayRows[index] = displayRows;

if(index == this.displayRows.length -1){
this.displayRowsCount = this.displayRows[this.displayRows.length -1].length;
}

return output;
}

getDisplayRows(index){
Expand Down

0 comments on commit 32c9718

Please sign in to comment.