@syncfusion/ej2-treegrid 19.4.41 → 19.4.50
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/CHANGELOG.md +34 -0
- 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 +41 -10
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +41 -10
- 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/helpers/e2e/treegridhelper.js +0 -3
- package/package.json +9 -9
- package/src/treegrid/actions/excel-export.js +5 -2
- package/src/treegrid/actions/virtual-scroll.js +5 -2
- package/src/treegrid/base/treegrid.js +26 -4
- package/src/treegrid/renderer/virtual-row-model-generator.js +4 -2
- package/src/treegrid/renderer/virtual-tree-content-render.js +1 -0
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/treegrid/bootstrap5-dark.css +1 -1
- package/styles/treegrid/bootstrap5.css +1 -1
|
@@ -3054,7 +3054,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3054
3054
|
* @returns {void}
|
|
3055
3055
|
*/
|
|
3056
3056
|
sortByColumn(columnName, direction, isMultiSort) {
|
|
3057
|
-
this.sortModule
|
|
3057
|
+
if (this.sortModule) {
|
|
3058
|
+
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
3059
|
+
}
|
|
3058
3060
|
}
|
|
3059
3061
|
/**
|
|
3060
3062
|
* Clears all the sorted columns of the TreeGrid.
|
|
@@ -3074,7 +3076,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3074
3076
|
* @hidden
|
|
3075
3077
|
*/
|
|
3076
3078
|
removeSortColumn(field) {
|
|
3077
|
-
this.sortModule
|
|
3079
|
+
if (this.sortModule) {
|
|
3080
|
+
this.sortModule.removeSortColumn(field);
|
|
3081
|
+
}
|
|
3078
3082
|
}
|
|
3079
3083
|
/**
|
|
3080
3084
|
* Searches TreeGrid records using the given key.
|
|
@@ -3431,6 +3435,9 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3431
3435
|
this.grid.isReact = true;
|
|
3432
3436
|
this.grid.portals = [];
|
|
3433
3437
|
}
|
|
3438
|
+
if (this.isVue) {
|
|
3439
|
+
this.grid.isVue = true;
|
|
3440
|
+
}
|
|
3434
3441
|
createSpinner({ target: this.element }, this.createElement);
|
|
3435
3442
|
this.log(['mapping_fields_missing']);
|
|
3436
3443
|
this.renderModule = new Render(this);
|
|
@@ -3709,6 +3716,16 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
3709
3716
|
}
|
|
3710
3717
|
}
|
|
3711
3718
|
}
|
|
3719
|
+
const action = 'action';
|
|
3720
|
+
if (this.enableVirtualization && this.selectionSettings.persistSelection && (this.dataResults[action] === 'expand' || this.dataResults[action] === 'collapse')) {
|
|
3721
|
+
const refreshPersistSelection = 'refreshPersistSelection';
|
|
3722
|
+
this.grid.selectionModule[refreshPersistSelection]();
|
|
3723
|
+
if (this.grid.selectionSettings.type === 'Single') {
|
|
3724
|
+
const updateRowSelection = 'updateRowSelection';
|
|
3725
|
+
const index = this.getCurrentViewRecords().indexOf(this.grid.selectionModule['data']);
|
|
3726
|
+
this.grid.selectionModule[updateRowSelection](this.getRows()[index], index);
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3712
3729
|
this.trigger(dataBound, args);
|
|
3713
3730
|
this.initialRender = false;
|
|
3714
3731
|
};
|
|
@@ -4933,7 +4950,7 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
4933
4950
|
gridColumn[prop] = gridColumns[i][prop];
|
|
4934
4951
|
}
|
|
4935
4952
|
this.columnModel.push(new Column(gridColumn));
|
|
4936
|
-
if (field === this.columnModel[i].field && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
4953
|
+
if (field === this.columnModel[i].field && this.columnModel[i].type !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
4937
4954
|
this.columnModel[i].template = temp;
|
|
4938
4955
|
}
|
|
4939
4956
|
}
|
|
@@ -5294,7 +5311,12 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
|
|
|
5294
5311
|
});
|
|
5295
5312
|
}
|
|
5296
5313
|
else if (isNullOrUndefined(record)) {
|
|
5297
|
-
|
|
5314
|
+
if (this.detailTemplate) {
|
|
5315
|
+
record = this.grid.getCurrentViewRecords()[row.getAttribute('aria-rowindex')];
|
|
5316
|
+
}
|
|
5317
|
+
else {
|
|
5318
|
+
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
5319
|
+
}
|
|
5298
5320
|
}
|
|
5299
5321
|
return record;
|
|
5300
5322
|
}
|
|
@@ -7898,10 +7920,12 @@ class TreeVirtualRowModelGenerator extends VirtualRowModelGenerator {
|
|
|
7898
7920
|
return super.getData();
|
|
7899
7921
|
}
|
|
7900
7922
|
generateRows(data, notifyArgs) {
|
|
7901
|
-
if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext &&
|
|
7923
|
+
if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext &&
|
|
7924
|
+
notifyArgs.virtualInfo.nextInfo.page !== this.parent.pageSettings.currentPage) {
|
|
7902
7925
|
this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.nextInfo.page } }, true);
|
|
7903
7926
|
}
|
|
7904
|
-
else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext &&
|
|
7927
|
+
else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext &&
|
|
7928
|
+
notifyArgs.virtualInfo.page !== this.parent.pageSettings.currentPage) {
|
|
7905
7929
|
this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.page } }, true);
|
|
7906
7930
|
}
|
|
7907
7931
|
const info = this.getDataInfo();
|
|
@@ -8355,9 +8379,9 @@ class ExcelExport$1 {
|
|
|
8355
8379
|
if (excelRow.type === 'excel') {
|
|
8356
8380
|
const excelrowobj = excelRow.rowObj.data;
|
|
8357
8381
|
const filtercolumnlength = this.parent.grid.filterSettings.columns.length;
|
|
8382
|
+
const rowlength = excelRow.excelRows.length;
|
|
8383
|
+
const rowlevel = excelrowobj.level;
|
|
8358
8384
|
if (excelrowobj.parentItem && getParentData(this.parent, excelrowobj.parentItem.uniqueID, Boolean(filtercolumnlength))) {
|
|
8359
|
-
const rowlength = excelRow.excelRows.length;
|
|
8360
|
-
const rowlevel = excelrowobj.level;
|
|
8361
8385
|
let expandedStatus = false;
|
|
8362
8386
|
let sublevelState = false;
|
|
8363
8387
|
const state = getExpandStatus(this.parent, excelrowobj, this.parent.parentData);
|
|
@@ -8368,6 +8392,9 @@ class ExcelExport$1 {
|
|
|
8368
8392
|
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel, isCollapsed: sublevelState,
|
|
8369
8393
|
isHidden: expandedStatus };
|
|
8370
8394
|
}
|
|
8395
|
+
else if (excelrowobj.hasChildRecords && isNullOrUndefined(excelrowobj.parentItem)) {
|
|
8396
|
+
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel };
|
|
8397
|
+
}
|
|
8371
8398
|
}
|
|
8372
8399
|
}
|
|
8373
8400
|
/* eslint-disable-next-line */
|
|
@@ -11465,6 +11492,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
11465
11492
|
const replace = 'replaceWith';
|
|
11466
11493
|
this.getTable().querySelector('tbody')[replace](target);
|
|
11467
11494
|
if (!this.isExpandCollapse || this.translateY === 0) {
|
|
11495
|
+
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
11468
11496
|
getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
|
|
11469
11497
|
}
|
|
11470
11498
|
else {
|
|
@@ -11658,7 +11686,10 @@ class VirtualScroll$1 {
|
|
|
11658
11686
|
record: row.record,
|
|
11659
11687
|
count: this.parent.flatData.length
|
|
11660
11688
|
};
|
|
11661
|
-
this.parent.
|
|
11689
|
+
if (this.parent.enableVirtualization && this.parent.selectionSettings.mode === 'Cell' ||
|
|
11690
|
+
this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection) {
|
|
11691
|
+
this.parent.grid.clearSelection();
|
|
11692
|
+
}
|
|
11662
11693
|
const requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
|
|
11663
11694
|
getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
|
|
11664
11695
|
}
|
|
@@ -11722,7 +11753,7 @@ class VirtualScroll$1 {
|
|
|
11722
11753
|
if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
|
|
11723
11754
|
startIndex = 0;
|
|
11724
11755
|
}
|
|
11725
|
-
else {
|
|
11756
|
+
else if (!this.parent['isExpandAll']) {
|
|
11726
11757
|
startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
|
|
11727
11758
|
}
|
|
11728
11759
|
}
|