@syncfusion/ej2-treegrid 32.1.19 → 32.1.22-1533505
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/dist/ej2-treegrid.min.js +1 -1
- package/dist/ej2-treegrid.umd.min.js +1 -1
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +24 -8
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +24 -8
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +1 -1
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/package.json +2 -2
- package/src/treegrid/actions/selection.js +9 -4
- package/src/treegrid/actions/virtual-scroll.js +1 -0
- package/src/treegrid/base/treegrid-model.d.ts +11 -11
- package/src/treegrid/base/treegrid.d.ts +23 -22
- package/src/treegrid/base/treegrid.js +23 -14
- package/src/treegrid/renderer/virtual-tree-content-render.js +2 -1
|
@@ -1618,7 +1618,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1618
1618
|
var newSelectedIndexes = [];
|
|
1619
1619
|
for (var _i = 0, currentlySelectedItemsInOrder_1 = currentlySelectedItemsInOrder; _i < currentlySelectedItemsInOrder_1.length; _i++) {
|
|
1620
1620
|
var item = currentlySelectedItemsInOrder_1[_i];
|
|
1621
|
-
if (item.hasChildRecords && isFilterOrSearch && item.level === 0) {
|
|
1621
|
+
if (item.hasChildRecords && isFilterOrSearch && item.level === 0 && this.parent.autoCheckHierarchy) {
|
|
1622
1622
|
this.updateParentSelection(item);
|
|
1623
1623
|
}
|
|
1624
1624
|
if (item.uniqueID && item.checkboxState === 'check') {
|
|
@@ -1950,9 +1950,14 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1950
1950
|
if ((requestType === 'filtering' || requestType === 'searching' || requestType === 'refresh' ||
|
|
1951
1951
|
requestType === 'sorting' || requestType === 'paging' || requestType === 'expanding' ||
|
|
1952
1952
|
requestType === 'expand' || requestType === 'collapsing' || requestType === 'collapse') && !isRemoteData(this.parent)) {
|
|
1953
|
-
this.
|
|
1954
|
-
|
|
1955
|
-
|
|
1953
|
+
if (!(isCheckboxcolumn(this.parent) && (requestType === 'refresh' && this.parent['isVirtualExpandCollapse']))) {
|
|
1954
|
+
this.selectedItems = [];
|
|
1955
|
+
this.selectedUidMap = new Map();
|
|
1956
|
+
this.selectedIndexes = [];
|
|
1957
|
+
}
|
|
1958
|
+
if (requestType === 'filtering' || requestType === 'searching' || requestType === 'sorting') {
|
|
1959
|
+
this.headerSelection(false);
|
|
1960
|
+
}
|
|
1956
1961
|
this.refreshVisibleCheckboxes();
|
|
1957
1962
|
if (this.parent.autoCheckHierarchy) {
|
|
1958
1963
|
this.updateHeaderCheckboxState();
|
|
@@ -4342,6 +4347,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
4342
4347
|
_this.freezeColumnRefresh = true;
|
|
4343
4348
|
_this.componentRefresh = Component.prototype.refresh;
|
|
4344
4349
|
_this.isComponentRefresh = false;
|
|
4350
|
+
_this.isVirtualExpandCollapse = false;
|
|
4345
4351
|
_this.objectEqualityChecker = function (old, current) {
|
|
4346
4352
|
if (old) {
|
|
4347
4353
|
var keys = Object.keys(old);
|
|
@@ -5138,12 +5144,18 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5138
5144
|
this.renderComplete();
|
|
5139
5145
|
var destroyTemplate = 'destroyTemplate';
|
|
5140
5146
|
var destroyTemplateFn = this.grid["" + destroyTemplate];
|
|
5147
|
+
var isGantt = this['isFromGantt'] && this.isReact;
|
|
5141
5148
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5142
5149
|
this.grid["" + destroyTemplate] = function (args, index, callback) {
|
|
5143
5150
|
destroyTemplateFn.apply(_this.grid);
|
|
5144
5151
|
var portals = 'portals';
|
|
5145
5152
|
if (!(_this.isReact && isNullOrUndefined(_this["" + portals]))) {
|
|
5146
|
-
|
|
5153
|
+
if (isGantt) {
|
|
5154
|
+
_this['root'].clearTemplate(args, index, callback);
|
|
5155
|
+
}
|
|
5156
|
+
else {
|
|
5157
|
+
_this.clearTemplate(args, index, callback);
|
|
5158
|
+
}
|
|
5147
5159
|
}
|
|
5148
5160
|
else if (!isNullOrUndefined(callback)) {
|
|
5149
5161
|
callback();
|
|
@@ -5168,7 +5180,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5168
5180
|
if (RecordsCount === 0 && this.columns.length === 0) {
|
|
5169
5181
|
failureCases.push('Either of the Data source or columns should be given.');
|
|
5170
5182
|
}
|
|
5171
|
-
if (this.frozenColumns > 0 && this.columnModel.filter(function (col) { return col.isFrozen; })) {
|
|
5183
|
+
if (this.frozenColumns > 0 && this.columnModel.filter(function (col) { return col.isFrozen; }).length > 0) {
|
|
5172
5184
|
failureCases.push('Use only one attribute for Frozen either IsFrozen or FrozenColumns.');
|
|
5173
5185
|
}
|
|
5174
5186
|
if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
|
|
@@ -5178,7 +5190,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5178
5190
|
&& (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
|
|
5179
5191
|
failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
|
|
5180
5192
|
}
|
|
5181
|
-
if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }).length > 0 || this.frozenRows > 0) && this.editSettings.mode === 'Cell') {
|
|
5193
|
+
if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }).length > 0 || this.frozenRows > 0) && this.editSettings.allowEditing && this.editSettings.mode === 'Cell') {
|
|
5182
5194
|
failureCases.push('Frozen rows and columns are not supported with cell editing.');
|
|
5183
5195
|
}
|
|
5184
5196
|
if (this.allowSelection && !isNullOrUndefined(this.rowTemplate)) {
|
|
@@ -5831,6 +5843,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
5831
5843
|
_this.notify(batchSave, args);
|
|
5832
5844
|
}
|
|
5833
5845
|
_this.notify('updateGridActions', args);
|
|
5846
|
+
_this.isVirtualExpandCollapse = false;
|
|
5834
5847
|
if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
|
|
5835
5848
|
_this.grid.refresh();
|
|
5836
5849
|
}
|
|
@@ -6849,6 +6862,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6849
6862
|
var table = this.getContentTable();
|
|
6850
6863
|
var sHeight = table.scrollHeight;
|
|
6851
6864
|
var clientHeight = this.getContent().clientHeight;
|
|
6865
|
+
removeClass(table.querySelectorAll('td.e-lastrowcell'), 'e-lastrowcell');
|
|
6852
6866
|
this.lastRowBorder(this.getRows()[currentRecords.indexOf(record)], sHeight <= clientHeight);
|
|
6853
6867
|
}
|
|
6854
6868
|
};
|
|
@@ -15113,7 +15127,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
15113
15127
|
*/
|
|
15114
15128
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15115
15129
|
VirtualTreeContentRenderer.prototype.getRowCollection = function (index, isMovable, isRowObject, isFrozenRight) {
|
|
15116
|
-
var
|
|
15130
|
+
var rows = this.parent.getRows();
|
|
15131
|
+
var startIdx = rows.length > 0 ? parseInt(rows[0].getAttribute(ariaRowIndex), 10) - 1 : 0;
|
|
15117
15132
|
var rowCollection = this.parent.getDataRows();
|
|
15118
15133
|
var collection = isRowObject ? this.parent.getCurrentViewRecords() : rowCollection;
|
|
15119
15134
|
var selectedRow = collection[index - startIdx];
|
|
@@ -16265,6 +16280,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
16265
16280
|
count: this.parent.flatData.length
|
|
16266
16281
|
};
|
|
16267
16282
|
this.handleSelection();
|
|
16283
|
+
this.parent['isVirtualExpandCollapse'] = true;
|
|
16268
16284
|
var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
|
|
16269
16285
|
getValue('grid.renderModule', this.parent).dataManagerSuccess(actionDetails, { requestType: requestType });
|
|
16270
16286
|
};
|