@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
|
@@ -3297,7 +3297,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3297
3297
|
* @returns {void}
|
|
3298
3298
|
*/
|
|
3299
3299
|
TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
|
|
3300
|
-
this.sortModule
|
|
3300
|
+
if (this.sortModule) {
|
|
3301
|
+
this.sortModule.sortColumn(columnName, direction, isMultiSort);
|
|
3302
|
+
}
|
|
3301
3303
|
};
|
|
3302
3304
|
/**
|
|
3303
3305
|
* Clears all the sorted columns of the TreeGrid.
|
|
@@ -3317,7 +3319,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3317
3319
|
* @hidden
|
|
3318
3320
|
*/
|
|
3319
3321
|
TreeGrid.prototype.removeSortColumn = function (field) {
|
|
3320
|
-
this.sortModule
|
|
3322
|
+
if (this.sortModule) {
|
|
3323
|
+
this.sortModule.removeSortColumn(field);
|
|
3324
|
+
}
|
|
3321
3325
|
};
|
|
3322
3326
|
/**
|
|
3323
3327
|
* Searches TreeGrid records using the given key.
|
|
@@ -3676,6 +3680,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3676
3680
|
this.grid.isReact = true;
|
|
3677
3681
|
this.grid.portals = [];
|
|
3678
3682
|
}
|
|
3683
|
+
if (this.isVue) {
|
|
3684
|
+
this.grid.isVue = true;
|
|
3685
|
+
}
|
|
3679
3686
|
createSpinner({ target: this.element }, this.createElement);
|
|
3680
3687
|
this.log(['mapping_fields_missing']);
|
|
3681
3688
|
this.renderModule = new Render(this);
|
|
@@ -3957,6 +3964,16 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
3957
3964
|
}
|
|
3958
3965
|
}
|
|
3959
3966
|
}
|
|
3967
|
+
var action = 'action';
|
|
3968
|
+
if (_this.enableVirtualization && _this.selectionSettings.persistSelection && (_this.dataResults[action] === 'expand' || _this.dataResults[action] === 'collapse')) {
|
|
3969
|
+
var refreshPersistSelection = 'refreshPersistSelection';
|
|
3970
|
+
_this.grid.selectionModule[refreshPersistSelection]();
|
|
3971
|
+
if (_this.grid.selectionSettings.type === 'Single') {
|
|
3972
|
+
var updateRowSelection = 'updateRowSelection';
|
|
3973
|
+
var index = _this.getCurrentViewRecords().indexOf(_this.grid.selectionModule['data']);
|
|
3974
|
+
_this.grid.selectionModule[updateRowSelection](_this.getRows()[index], index);
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3960
3977
|
_this.trigger(dataBound, args);
|
|
3961
3978
|
_this.initialRender = false;
|
|
3962
3979
|
};
|
|
@@ -5191,7 +5208,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5191
5208
|
gridColumn[prop] = gridColumns[i][prop];
|
|
5192
5209
|
}
|
|
5193
5210
|
this.columnModel.push(new Column(gridColumn));
|
|
5194
|
-
if (field === this.columnModel[i].field && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
5211
|
+
if (field === this.columnModel[i].field && this.columnModel[i].type !== 'checkbox' && (!isNullOrUndefined(temp) && temp !== '')) {
|
|
5195
5212
|
this.columnModel[i].template = temp;
|
|
5196
5213
|
}
|
|
5197
5214
|
}
|
|
@@ -5555,7 +5572,12 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5555
5572
|
});
|
|
5556
5573
|
}
|
|
5557
5574
|
else if (isNullOrUndefined(record)) {
|
|
5558
|
-
|
|
5575
|
+
if (this.detailTemplate) {
|
|
5576
|
+
record = this.grid.getCurrentViewRecords()[row.getAttribute('aria-rowindex')];
|
|
5577
|
+
}
|
|
5578
|
+
else {
|
|
5579
|
+
record = this.grid.getCurrentViewRecords()[row.rowIndex];
|
|
5580
|
+
}
|
|
5559
5581
|
}
|
|
5560
5582
|
return record;
|
|
5561
5583
|
};
|
|
@@ -8227,10 +8249,12 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
|
|
|
8227
8249
|
return _super.prototype.getData.call(this);
|
|
8228
8250
|
};
|
|
8229
8251
|
TreeVirtualRowModelGenerator.prototype.generateRows = function (data, notifyArgs) {
|
|
8230
|
-
if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext &&
|
|
8252
|
+
if (!isNullOrUndefined(notifyArgs.virtualInfo) && notifyArgs.virtualInfo.loadNext &&
|
|
8253
|
+
notifyArgs.virtualInfo.nextInfo.page !== this.parent.pageSettings.currentPage) {
|
|
8231
8254
|
this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.nextInfo.page } }, true);
|
|
8232
8255
|
}
|
|
8233
|
-
else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext &&
|
|
8256
|
+
else if (!isNullOrUndefined(notifyArgs.virtualInfo) && !notifyArgs.virtualInfo.loadNext &&
|
|
8257
|
+
notifyArgs.virtualInfo.page !== this.parent.pageSettings.currentPage) {
|
|
8234
8258
|
this.parent.setProperties({ pageSettings: { currentPage: notifyArgs.virtualInfo.page } }, true);
|
|
8235
8259
|
}
|
|
8236
8260
|
var info = this.getDataInfo();
|
|
@@ -8687,9 +8711,9 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
8687
8711
|
if (excelRow.type === 'excel') {
|
|
8688
8712
|
var excelrowobj = excelRow.rowObj.data;
|
|
8689
8713
|
var filtercolumnlength = this.parent.grid.filterSettings.columns.length;
|
|
8714
|
+
var rowlength = excelRow.excelRows.length;
|
|
8715
|
+
var rowlevel = excelrowobj.level;
|
|
8690
8716
|
if (excelrowobj.parentItem && getParentData(this.parent, excelrowobj.parentItem.uniqueID, Boolean(filtercolumnlength))) {
|
|
8691
|
-
var rowlength = excelRow.excelRows.length;
|
|
8692
|
-
var rowlevel = excelrowobj.level;
|
|
8693
8717
|
var expandedStatus = false;
|
|
8694
8718
|
var sublevelState = false;
|
|
8695
8719
|
var state = getExpandStatus(this.parent, excelrowobj, this.parent.parentData);
|
|
@@ -8700,6 +8724,9 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
|
|
|
8700
8724
|
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel, isCollapsed: sublevelState,
|
|
8701
8725
|
isHidden: expandedStatus };
|
|
8702
8726
|
}
|
|
8727
|
+
else if (excelrowobj.hasChildRecords && isNullOrUndefined(excelrowobj.parentItem)) {
|
|
8728
|
+
excelRow.excelRows[rowlength - 1].grouping = { outlineLevel: rowlevel };
|
|
8729
|
+
}
|
|
8703
8730
|
}
|
|
8704
8731
|
};
|
|
8705
8732
|
/* eslint-disable-next-line */
|
|
@@ -11844,6 +11871,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
11844
11871
|
var replace = 'replaceWith';
|
|
11845
11872
|
this.getTable().querySelector('tbody')[replace](target);
|
|
11846
11873
|
if (!this.isExpandCollapse || this.translateY === 0) {
|
|
11874
|
+
this.translateY = this.translateY < 0 ? 0 : this.translateY;
|
|
11847
11875
|
getValue('virtualEle', this).adjustTable(cOffset, this.translateY);
|
|
11848
11876
|
}
|
|
11849
11877
|
else {
|
|
@@ -12055,7 +12083,10 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
12055
12083
|
record: row.record,
|
|
12056
12084
|
count: this.parent.flatData.length
|
|
12057
12085
|
};
|
|
12058
|
-
this.parent.
|
|
12086
|
+
if (this.parent.enableVirtualization && this.parent.selectionSettings.mode === 'Cell' ||
|
|
12087
|
+
this.parent.selectionSettings.mode === 'Row' && !this.parent.selectionSettings.persistSelection) {
|
|
12088
|
+
this.parent.grid.clearSelection();
|
|
12089
|
+
}
|
|
12059
12090
|
var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
|
|
12060
12091
|
getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
|
|
12061
12092
|
};
|
|
@@ -12120,7 +12151,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
12120
12151
|
if (pageingDetails.count < this.parent.getRows()[0].getBoundingClientRect().height) {
|
|
12121
12152
|
startIndex = 0;
|
|
12122
12153
|
}
|
|
12123
|
-
else {
|
|
12154
|
+
else if (!this.parent['isExpandAll']) {
|
|
12124
12155
|
startIndex = this.prevstartIndex === -1 ? 0 : this.prevstartIndex;
|
|
12125
12156
|
}
|
|
12126
12157
|
}
|