@datorama/core 21.4.0-rc.2 → 21.4.0-rc.3
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/bundles/datorama-core.umd.js +18 -8
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +1 -1
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/datorama-core.metadata.json +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.query.js +20 -9
- package/esm5/lib/grid-v2/grid-store/grid.query.js +20 -9
- package/fesm2015/datorama-core.js +18 -8
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +18 -8
- package/fesm5/datorama-core.js.map +1 -1
- package/package.json +1 -1
package/fesm5/datorama-core.js
CHANGED
|
@@ -11366,14 +11366,24 @@ var GridQuery = /** @class */ (function (_super) {
|
|
|
11366
11366
|
return settings;
|
|
11367
11367
|
};
|
|
11368
11368
|
GridQuery.prototype.getSort = function () {
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
|
|
11369
|
+
if (this.gridRef.gridOptions.pivotMode) {
|
|
11370
|
+
var _a = this.api.grid.getSortModel().pop() || {}, sort = _a.sort, colId_1 = _a.colId;
|
|
11371
|
+
var column = this.api.columns.getColumn(colId_1);
|
|
11372
|
+
var secondaryColumns = this.api.columns.getSecondaryColumns();
|
|
11373
|
+
var pivotedColumn_1 = secondaryColumns && secondaryColumns.find(function (col) { return col.getColId() === colId_1; });
|
|
11374
|
+
if (pivotedColumn_1) {
|
|
11375
|
+
var uniquePivotParents = uniq(secondaryColumns.map(function (column) { return column.getParent(); }));
|
|
11376
|
+
var secondaryColumn = secondaryColumns.find(function (col) { return col.getColId() === pivotedColumn_1.getColId(); });
|
|
11377
|
+
var pivotColIndex = uniquePivotParents.indexOf(secondaryColumn.getParent());
|
|
11378
|
+
return { colId: getColField(pivotedColumn_1.getColDef()), sort: sort, pivotColIndex: pivotColIndex };
|
|
11379
|
+
}
|
|
11380
|
+
else if (column) {
|
|
11381
|
+
return { colId: getColField(column.getColDef()), sort: sort };
|
|
11382
|
+
}
|
|
11383
|
+
}
|
|
11384
|
+
else {
|
|
11385
|
+
return this.api.grid.getSortModel().pop();
|
|
11386
|
+
}
|
|
11377
11387
|
};
|
|
11378
11388
|
GridQuery.prototype.selectSort = function () {
|
|
11379
11389
|
return this.select(function (state) { return state.settings.sort; });
|