Skip to content

Commit

Permalink
copy also in fast cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Dec 9, 2018
1 parent b229042 commit 44e7446
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/provider/LocalDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default class LocalDataProvider extends ACommonDataProvider {
return filter;
}

private noSorting() {
private noSorting(ranking: Ranking) {
// initial no sorting required just index mapping
const l = this._data.length;
const order = createIndexArray(l);
Expand All @@ -201,6 +201,8 @@ export default class LocalDataProvider extends ACommonDataProvider {
order[i] = i;
index2pos[i] = i + 1; // shift since default is 0
}

this.tasks.preCompute(ranking, [{rows: order, group: defaultGroup}]);
return {groups: [Object.assign({order}, defaultGroup)], index2pos};
}

Expand Down Expand Up @@ -296,7 +298,7 @@ export default class LocalDataProvider extends ACommonDataProvider {

if (!isGroupedBy && !isSortedBy && !filter) {
// TODO copy data stats to summary and group stats
return this.noSorting();
return this.noSorting(ranking);
}

// TODO not required if: sort criteria changed, group sort criteria changed
Expand Down

0 comments on commit 44e7446

Please sign in to comment.