@syncfusion/ej2-treegrid 32.2.4 → 32.2.7
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/dist/ej2-treegrid.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js +2 -2
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +42 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +43 -17
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +2 -2
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +4 -4
- package/src/treegrid/actions/pdf-export.d.ts +1 -0
- package/src/treegrid/actions/pdf-export.js +31 -0
- package/src/treegrid/actions/sort.d.ts +1 -0
- package/src/treegrid/actions/sort.js +6 -0
- package/src/treegrid/base/treegrid.js +6 -17
|
@@ -5521,23 +5521,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5521
5521
|
if (args.requestType === 'save' && this.aggregates.map((ag) => ag.showChildSummary === true).length) {
|
|
5522
5522
|
this.grid.refresh();
|
|
5523
5523
|
}
|
|
5524
|
-
if (args.action === 'filter') {
|
|
5525
|
-
if (!args.isCollapseMaintain && this.filterModule['currentFilterObject'] !== '' && this.enableVirtualization && !this.initialRender && !this.expandStateMapping && !(isRemoteData(this) && this.enableVirtualization)) {
|
|
5526
|
-
this.expandAll();
|
|
5527
|
-
}
|
|
5528
|
-
}
|
|
5529
|
-
if (args.requestType === 'searching') {
|
|
5530
|
-
if (!args.isCollapseMaintain && this.searchSettings.key !== '' && this.enableVirtualization && !this.initialRender && !this.expandStateMapping && !(isRemoteData(this) && this.enableVirtualization)) {
|
|
5531
|
-
this.expandAll();
|
|
5532
|
-
}
|
|
5533
|
-
}
|
|
5534
|
-
if (args.action === 'clearFilter' && this.enableCollapseAll) {
|
|
5535
|
-
this.collapseAll();
|
|
5536
|
-
}
|
|
5537
|
-
if (args.action === 'clearFilter' && this.enableInfiniteScrolling) {
|
|
5538
|
-
this.expandAll();
|
|
5539
|
-
}
|
|
5540
|
-
if (args.requestType === 'sorting' && this.enableInfiniteScrolling) {
|
|
5524
|
+
if ((args.action === 'clearFilter' || args.action === 'clear-filter' || args.requestType === 'sorting') && this.enableInfiniteScrolling) {
|
|
5541
5525
|
this.expandAll();
|
|
5542
5526
|
}
|
|
5543
5527
|
if (this.action === 'indenting' || this.action === 'outdenting') {
|
|
@@ -6529,6 +6513,11 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
6529
6513
|
rowData.hasChildRecords = record.hasChildRecords;
|
|
6530
6514
|
rowData.parentUniqueID = record.parentUniqueID;
|
|
6531
6515
|
rowData.expanded = record.expanded;
|
|
6516
|
+
if (this.enableVirtualization) {
|
|
6517
|
+
this.grid.selectionModule.selectedRowIndexes = this.grid.selectionModule.selectedRowIndexes.indexOf(record.index) === -1
|
|
6518
|
+
&& (this.selectedRowIndex >= 0 && this.selectedRowIndex !== record.index) ? [record.index] :
|
|
6519
|
+
this.grid.selectionModule.selectedRowIndexes;
|
|
6520
|
+
}
|
|
6532
6521
|
this.grid.setRowData(key, rowData);
|
|
6533
6522
|
const visibleRecords = this.getVisibleRecords();
|
|
6534
6523
|
if (visibleRecords.length > 0 && key === (visibleRecords[visibleRecords.length - 1])[`${primaryKey}`]) {
|
|
@@ -11609,6 +11598,7 @@ class PdfExport {
|
|
|
11609
11598
|
* @param {TreeGrid} parent - Tree Grid instance
|
|
11610
11599
|
*/
|
|
11611
11600
|
constructor(parent) {
|
|
11601
|
+
this.isCollapsedStatePersist = false;
|
|
11612
11602
|
Grid.Inject(PdfExport$1);
|
|
11613
11603
|
this.parent = parent;
|
|
11614
11604
|
this.dataResults = {};
|
|
@@ -11661,6 +11651,18 @@ class PdfExport {
|
|
|
11661
11651
|
const prop = Object();
|
|
11662
11652
|
const isLocal = !isRemoteData(this.parent) && isOffline(this.parent);
|
|
11663
11653
|
setValue('cancel', false, prop);
|
|
11654
|
+
if (!isNullOrUndefined(pdfExportProperties)) {
|
|
11655
|
+
this.isCollapsedStatePersist = pdfExportProperties.isCollapsedStatePersist;
|
|
11656
|
+
}
|
|
11657
|
+
if (!isNullOrUndefined(pdfExportProperties)) {
|
|
11658
|
+
if (!isLocal && !isNullOrUndefined(pdfExportProperties.dataSource) && !pdfExportProperties.dataSource['dataSource']) {
|
|
11659
|
+
return this.parent.grid.pdfExportModule.Map(this.parent.grid, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
11660
|
+
}
|
|
11661
|
+
if (pdfExportProperties.exportType === 'CurrentPage') {
|
|
11662
|
+
pdfExportProperties.dataSource = this.parent.getCurrentViewRecords();
|
|
11663
|
+
return this.parent.grid.pdfExportModule.Map(this.parent.grid, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
|
|
11664
|
+
}
|
|
11665
|
+
}
|
|
11664
11666
|
return new Promise((resolve) => {
|
|
11665
11667
|
const dm = isLocal && !(dtSrc instanceof DataManager) ? new DataManager(dtSrc)
|
|
11666
11668
|
: this.parent.dataSource;
|
|
@@ -11706,6 +11708,23 @@ class PdfExport {
|
|
|
11706
11708
|
//count not required for this query
|
|
11707
11709
|
const isLocal = !isRemoteData(this.parent) && isOffline(this.parent);
|
|
11708
11710
|
setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
|
|
11711
|
+
if (!isLocal && !isNullOrUndefined(prop) && !isNullOrUndefined(prop.isCollapsedStatePersist)
|
|
11712
|
+
&& prop.isCollapsedStatePersist === false) {
|
|
11713
|
+
if (args.query && args.query.queries && args.query.queries.length) {
|
|
11714
|
+
args.query.queries = args.query.queries.filter((q) => {
|
|
11715
|
+
if (q.fn === 'onWhere' && q.e) {
|
|
11716
|
+
const preds = q.e;
|
|
11717
|
+
if (preds && preds.field === this.parent.parentIdMapping && (preds.value === null || preds.value === 'null')) {
|
|
11718
|
+
return false;
|
|
11719
|
+
}
|
|
11720
|
+
}
|
|
11721
|
+
return true;
|
|
11722
|
+
});
|
|
11723
|
+
}
|
|
11724
|
+
if (args.query && args.query.params && args.query.params.length) {
|
|
11725
|
+
args.query.params = args.query.params.filter((param) => param.key !== 'IdMapping');
|
|
11726
|
+
}
|
|
11727
|
+
}
|
|
11709
11728
|
setValue('isExport', true, args);
|
|
11710
11729
|
setValue('isPdfExport', true, args);
|
|
11711
11730
|
if (!isNullOrUndefined(prop) && !isNullOrUndefined(prop.isCollapsedStatePersist)) {
|
|
@@ -12396,6 +12415,12 @@ class Sort {
|
|
|
12396
12415
|
this.iterateSort(data, srtQry);
|
|
12397
12416
|
this.storedIndex = -1;
|
|
12398
12417
|
sortParams.modifiedData = this.flatSortedData;
|
|
12418
|
+
if (srtQry.queries.filter((q) => q.fn === 'onSortBy').length > 0) {
|
|
12419
|
+
this.sortedResult = this.flatSortedData.filter((item) => !item.isSummaryRow);
|
|
12420
|
+
}
|
|
12421
|
+
else {
|
|
12422
|
+
this.sortedResult = [];
|
|
12423
|
+
}
|
|
12399
12424
|
this.flatSortedData = [];
|
|
12400
12425
|
}
|
|
12401
12426
|
iterateSort(data, srtQry) {
|