@datorama/core 22.8.2-rc.2 → 22.9.1-rc.1
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 +14 -20
- package/bundles/datorama-core.umd.js.map +1 -1
- package/bundles/datorama-core.umd.min.js +2 -2
- package/bundles/datorama-core.umd.min.js.map +1 -1
- package/esm2015/lib/grid-v2/grid-store/grid.service.js +14 -20
- package/esm2015/lib/version.js +2 -2
- package/esm5/lib/grid-v2/grid-store/grid.service.js +14 -20
- package/esm5/lib/version.js +2 -2
- package/fesm2015/datorama-core.js +14 -20
- package/fesm2015/datorama-core.js.map +1 -1
- package/fesm5/datorama-core.js +14 -20
- package/fesm5/datorama-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -12729,35 +12729,29 @@ let GridService = class GridService {
|
|
|
12729
12729
|
setGridSort(gridSort) {
|
|
12730
12730
|
if (gridSort && this.api && this.api.grid.getDisplayedRowCount() > 0) {
|
|
12731
12731
|
const { colId, sort, sortIndex } = gridSort;
|
|
12732
|
-
|
|
12733
|
-
if (
|
|
12734
|
-
|
|
12735
|
-
|
|
12732
|
+
const gridColumns = this.api.columns.getAllGridColumns();
|
|
12733
|
+
if (gridColumns) {
|
|
12734
|
+
let sortToApply = gridSort;
|
|
12735
|
+
/** Sort by column id */
|
|
12736
|
+
const columnById = gridColumns.find((col) => {
|
|
12737
|
+
return (col.getColDef().showRowGroup || col.getColId()) === colId;
|
|
12738
|
+
});
|
|
12739
|
+
if (columnById) {
|
|
12740
|
+
sortToApply = { colId: columnById.getColId(), sort };
|
|
12741
|
+
}
|
|
12742
|
+
else if (!isNil(sortIndex)) {
|
|
12736
12743
|
const valueColumns = this.api.columns.getValueColumns();
|
|
12737
12744
|
const valueColumn = valueColumns.find((col) => col.getColId() === colId);
|
|
12738
12745
|
const isPivotColId = colId.startsWith('pivot');
|
|
12739
12746
|
if (isPivotColId || valueColumn) {
|
|
12740
12747
|
/** Column is pivot value column, sort by index */
|
|
12741
12748
|
const columnByIndex = gridColumns[sortIndex];
|
|
12742
|
-
// const pivotValueColumn = columnByIndex && columnByIndex.getColDef().pivotValueColumn;
|
|
12743
|
-
// const pivotValueColumnId = pivotValueColumn && pivotValueColumn.getColId();
|
|
12744
|
-
// if (pivotValueColumnId === colId) {
|
|
12745
12749
|
sortToApply = { colId: columnByIndex.getColId(), sort, sortIndex };
|
|
12746
|
-
// }
|
|
12747
|
-
}
|
|
12748
|
-
else {
|
|
12749
|
-
/** Sort by column id */
|
|
12750
|
-
const columnById = gridColumns.find((col) => {
|
|
12751
|
-
return (col.getColDef().showRowGroup || col.getColId()) === colId;
|
|
12752
|
-
});
|
|
12753
|
-
if (columnById) {
|
|
12754
|
-
sortToApply = { colId: columnById.getColId(), sort };
|
|
12755
|
-
}
|
|
12756
12750
|
}
|
|
12757
12751
|
}
|
|
12752
|
+
this.updateSettings({ sort: sortToApply });
|
|
12753
|
+
this.api.grid.setSortModel([sortToApply]);
|
|
12758
12754
|
}
|
|
12759
|
-
this.updateSettings({ sort: sortToApply });
|
|
12760
|
-
this.api.grid.setSortModel([sortToApply]);
|
|
12761
12755
|
}
|
|
12762
12756
|
}
|
|
12763
12757
|
updateFilter(column, filter) {
|
|
@@ -22726,7 +22720,7 @@ function fixNgLeaks() {
|
|
|
22726
22720
|
};
|
|
22727
22721
|
}
|
|
22728
22722
|
|
|
22729
|
-
window.coreVersion = '22.
|
|
22723
|
+
window.coreVersion = '22.9.1-rc.';
|
|
22730
22724
|
|
|
22731
22725
|
/**
|
|
22732
22726
|
* @license
|