angular-slickgrid 5.3.0 → 5.4.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/README.md +1 -1
- package/app/modules/angular-slickgrid/components/angular-slickgrid.component.d.ts +5 -5
- package/esm2020/app/modules/angular-slickgrid/components/angular-slickgrid.component.mjs +14 -16
- package/esm2020/app/modules/angular-slickgrid/global-grid-options.mjs +6 -2
- package/fesm2015/angular-slickgrid.mjs +19 -17
- package/fesm2015/angular-slickgrid.mjs.map +1 -1
- package/fesm2020/angular-slickgrid.mjs +18 -16
- package/fesm2020/angular-slickgrid.mjs.map +1 -1
- package/package.json +9 -9
- package/test/cypress/node_modules/qs/README.md +54 -19
|
@@ -7,10 +7,10 @@ import { TranslateModule } from '@ngx-translate/core';
|
|
|
7
7
|
import { SlickRowDetailView as SlickRowDetailView$1 } from '@slickgrid-universal/row-detail-view-plugin';
|
|
8
8
|
import { Observable } from 'rxjs';
|
|
9
9
|
import * as DOMPurify from 'dompurify';
|
|
10
|
-
import 'slickgrid/
|
|
11
|
-
import 'slickgrid/
|
|
12
|
-
import 'slickgrid/
|
|
13
|
-
import 'slickgrid/
|
|
10
|
+
import 'slickgrid/slick.core';
|
|
11
|
+
import 'slickgrid/slick.interactions';
|
|
12
|
+
import 'slickgrid/slick.grid';
|
|
13
|
+
import 'slickgrid/slick.dataview';
|
|
14
14
|
import { EventPubSubService } from '@slickgrid-universal/event-pub-sub';
|
|
15
15
|
import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component';
|
|
16
16
|
import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component';
|
|
@@ -512,7 +512,11 @@ const GlobalGridOptions = {
|
|
|
512
512
|
}
|
|
513
513
|
},
|
|
514
514
|
dataView: {
|
|
515
|
-
|
|
515
|
+
// when enabled, this will preserve the row selection even after filtering/sorting/grouping
|
|
516
|
+
syncGridSelection: {
|
|
517
|
+
preserveHidden: false,
|
|
518
|
+
preserveHiddenOnSelectionChange: true
|
|
519
|
+
},
|
|
516
520
|
syncGridSelectionWithBackendService: false, // but disable it when using backend services
|
|
517
521
|
},
|
|
518
522
|
datasetIdPropertyName: 'id',
|
|
@@ -1234,11 +1238,11 @@ class AngularSlickgridComponent {
|
|
|
1234
1238
|
}
|
|
1235
1239
|
/**
|
|
1236
1240
|
* On a Pagination changed, we will trigger a Grid State changed with the new pagination info
|
|
1237
|
-
* Also if we use Row Selection or the Checkbox Selector, we need to reset any selection
|
|
1241
|
+
* Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection
|
|
1238
1242
|
*/
|
|
1239
1243
|
paginationChanged(pagination) {
|
|
1240
1244
|
const isSyncGridSelectionEnabled = this.gridStateService?.needToPreserveRowSelection() ?? false;
|
|
1241
|
-
if (!isSyncGridSelectionEnabled && (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector)) {
|
|
1245
|
+
if (this.slickGrid && !isSyncGridSelectionEnabled && this.gridOptions?.backendServiceApi && (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector)) {
|
|
1242
1246
|
this.slickGrid.setSelectedRows([]);
|
|
1243
1247
|
}
|
|
1244
1248
|
const { pageNumber, pageSize } = pagination;
|
|
@@ -1695,15 +1699,13 @@ class AngularSlickgridComponent {
|
|
|
1695
1699
|
else if (Array.isArray(gridRowIndexes) && gridRowIndexes.length > 0) {
|
|
1696
1700
|
dataContextIds = this.dataView.mapRowsToIds(gridRowIndexes) || [];
|
|
1697
1701
|
}
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
this.slickGrid.setSelectedRows(gridRowIndexes);
|
|
1706
|
-
}
|
|
1702
|
+
// apply row selection when defined as grid presets
|
|
1703
|
+
if (this.slickGrid && Array.isArray(gridRowIndexes)) {
|
|
1704
|
+
this.slickGrid.setSelectedRows(gridRowIndexes);
|
|
1705
|
+
this.dataView.setSelectedIds(dataContextIds || [], {
|
|
1706
|
+
isRowBeingAdded: true,
|
|
1707
|
+
shouldTriggerEvent: false,
|
|
1708
|
+
applyRowSelectionToGrid: true
|
|
1707
1709
|
});
|
|
1708
1710
|
}
|
|
1709
1711
|
}
|