Skip to content

Commit

Permalink
add more direct control of columnChange flagging to data loader
Browse files Browse the repository at this point in the history
  • Loading branch information
olifolkerd committed May 2, 2022
1 parent 99b1742 commit be6bf99
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/js/core/CoreFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default class CoreFeature{
/////////////// DataLoad /////////////////
//////////////////////////////////////////

reloadData(data, silent){
return this.table.dataLoader.load(data, undefined, undefined, undefined, silent);
reloadData(data, silent, columnsChanged){
return this.table.dataLoader.load(data, undefined, undefined, undefined, silent, columnsChanged);
}

//////////////////////////////////////////
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/tools/DataLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class DataLoader extends CoreFeature{

initialize(){}

load(data, params, config, replace, silent){
load(data, params, config, replace, silent, columnsChanged){
var requestNo = ++this.requestOrder;

this.dispatchExternal("dataLoading", data);
Expand Down Expand Up @@ -46,7 +46,7 @@ export default class DataLoader extends CoreFeature{

if(rowData !== false){
this.dispatchExternal("dataLoaded", rowData);
this.table.rowManager.setData(rowData, replace, !replace);
this.table.rowManager.setData(rowData, replace, typeof columnsChanged === "undefined" ? !replace : columnsChanged);
}
}else{
console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made");
Expand All @@ -73,7 +73,7 @@ export default class DataLoader extends CoreFeature{
data = [];
}

this.table.rowManager.setData(data, replace, !replace);
this.table.rowManager.setData(data, replace, typeof columnsChanged === "undefined" ? !replace : columnsChanged);
return Promise.resolve();
}
}
Expand Down

0 comments on commit be6bf99

Please sign in to comment.