@datarailsshared/dr_renderer 1.2.323-dragons → 1.2.325

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/pivottable.js CHANGED
@@ -686,22 +686,14 @@ let initPivotTable = function($, window, document) {
686
686
  });
687
687
  this.tree = {};
688
688
  this.insights = [];
689
-
690
- this.isKeysSortingDoneOnBackendSide = opts.keysObject && typeof opts.keysObject === 'object';
691
- if (this.isKeysSortingDoneOnBackendSide) {
692
- this.rowKeys = opts.keysObject.row_keys;
693
- this.colKeys = opts.keysObject.col_keys;
694
- // TODO: add also for breakdown sort object when BE story is ready.
695
- } else {
696
- this.rowKeys = [];
697
- this.colKeys = [];
698
- }
699
-
689
+ this.rowKeys = [];
690
+ this.colKeys = [];
700
691
  this.rowTotals = {};
701
692
  this.colTotals = {};
702
693
  this.allTotal = this.aggregator(this, [], []);
703
694
  this.sorted = false;
704
695
  this.dateValuesDictionary = opts.dateValuesDictionary;
696
+ this.sortByValueAttrs = opts.sortByValueAttrs || [];
705
697
  PivotData.forEachRecord(this.input, this.derivedAttributes, (function(_this) {
706
698
  return function(record) {
707
699
  if (_this.filter(record)) {
@@ -861,16 +853,12 @@ let initPivotTable = function($, window, document) {
861
853
  };
862
854
 
863
855
  PivotData.prototype.getColKeys = function() {
864
- if (!this.isKeysSortingDoneOnBackendSide) {
865
- this.sortKeys();
866
- }
856
+ this.sortKeys();
867
857
  return this.colKeys;
868
858
  };
869
859
 
870
860
  PivotData.prototype.getRowKeys = function() {
871
- if (!this.isKeysSortingDoneOnBackendSide) {
872
- this.sortKeys();
873
- }
861
+ this.sortKeys();
874
862
  return this.rowKeys;
875
863
  };
876
864