@syncfusion/ej2-treegrid 20.2.36 → 20.2.38
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 +11 -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 +29 -17
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +23 -11
- 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 +9 -9
- package/src/treegrid/actions/edit.js +12 -5
- package/src/treegrid/actions/selection.js +6 -1
- package/src/treegrid/base/data.js +2 -2
- package/src/treegrid/base/treegrid.js +1 -1
- package/src/treegrid/renderer/render.js +1 -1
- package/src/treegrid/renderer/virtual-tree-content-render.js +1 -1
|
@@ -1119,7 +1119,12 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1119
1119
|
if (indeter > 0 || (checkChildRecords > 0 && checkChildRecords !== length)) {
|
|
1120
1120
|
record.checkboxState = 'indeterminate';
|
|
1121
1121
|
}
|
|
1122
|
-
else if (checkChildRecords === 0 &&
|
|
1122
|
+
else if (checkChildRecords === 0 && (!record.hasFilteredChildRecords || isNullOrUndefined(record.hasFilteredChildRecords)) && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
|
|
1123
|
+
(this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check') {
|
|
1124
|
+
record.checkboxState = 'check';
|
|
1125
|
+
}
|
|
1126
|
+
else if ((checkChildRecords === 0 && indeter === 0) || (checkChildRecords === 0 && record.hasFilteredChildRecords && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
|
|
1127
|
+
(this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check')) {
|
|
1123
1128
|
record.checkboxState = 'uncheck';
|
|
1124
1129
|
}
|
|
1125
1130
|
else {
|
|
@@ -1548,7 +1553,7 @@ var Render = /** @__PURE__ @class */ (function () {
|
|
|
1548
1553
|
var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
|
|
1549
1554
|
return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
|
|
1550
1555
|
});
|
|
1551
|
-
if (parentrec.length > 0) {
|
|
1556
|
+
if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
|
|
1552
1557
|
var display = parentrec[0].expanded ? 'table-row' : 'none';
|
|
1553
1558
|
args.row.setAttribute('style', 'display: ' + display + ';');
|
|
1554
1559
|
}
|
|
@@ -2194,8 +2199,8 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
|
|
|
2194
2199
|
if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
|
|
2195
2200
|
currentData.index = this.storedIndex;
|
|
2196
2201
|
}
|
|
2197
|
-
if (!isNullOrUndefined(currentData[this.parent.childMapping]) ||
|
|
2198
|
-
(currentData[this.parent.hasChildMapping] && isCountRequired(this.parent))) {
|
|
2202
|
+
if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
|
|
2203
|
+
((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent) && this.parent.initialRender)) {
|
|
2199
2204
|
currentData.hasChildRecords = true;
|
|
2200
2205
|
if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
|
|
2201
2206
|
&& isNullOrUndefined(currentData[this.parent.childMapping])) {
|
|
@@ -6146,7 +6151,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
6146
6151
|
var args = { data: record, row: row };
|
|
6147
6152
|
var rows = [];
|
|
6148
6153
|
rows = gridRows.filter(function (r) {
|
|
6149
|
-
return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
|
|
6154
|
+
return ((r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1))) || (r.querySelector('.e-gridrowindex' + record.index + 'level0' + '.e-summarycell')));
|
|
6150
6155
|
});
|
|
6151
6156
|
if (action === 'expand') {
|
|
6152
6157
|
this.notify(remoteExpand, { record: record, rows: rows, parentRow: row });
|
|
@@ -11337,9 +11342,11 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11337
11342
|
this.parent.parentData.push(data[i]);
|
|
11338
11343
|
}
|
|
11339
11344
|
}
|
|
11340
|
-
if (
|
|
11341
|
-
|
|
11342
|
-
|
|
11345
|
+
if (!this.parent.enableInfiniteScrolling) {
|
|
11346
|
+
if (details.action === 'add' && this.previousNewRowPosition != null) {
|
|
11347
|
+
this.parent.setProperties({ editSettings: { newRowPosition: this.previousNewRowPosition } }, true);
|
|
11348
|
+
this.previousNewRowPosition = null;
|
|
11349
|
+
}
|
|
11343
11350
|
}
|
|
11344
11351
|
};
|
|
11345
11352
|
Edit$$1.prototype.updateIndex = function (data, rows, records) {
|
|
@@ -11587,14 +11594,19 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
11587
11594
|
}
|
|
11588
11595
|
else {
|
|
11589
11596
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
11590
|
-
|
|
11597
|
+
if (args.index !== 0) {
|
|
11598
|
+
this.addRowIndex = args.index;
|
|
11599
|
+
}
|
|
11600
|
+
else {
|
|
11601
|
+
this.addRowIndex = this.parent.grid.selectedRowIndex;
|
|
11602
|
+
}
|
|
11591
11603
|
}
|
|
11592
11604
|
else {
|
|
11593
11605
|
this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
|
|
11594
11606
|
}
|
|
11595
11607
|
}
|
|
11596
11608
|
if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
11597
|
-
this.addRowRecord = this.parent.flatData[
|
|
11609
|
+
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
11598
11610
|
}
|
|
11599
11611
|
else {
|
|
11600
11612
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
@@ -12096,7 +12108,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12096
12108
|
getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
|
|
12097
12109
|
}
|
|
12098
12110
|
}
|
|
12099
|
-
if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && this.startIndex === -1)) {
|
|
12111
|
+
if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && (this.startIndex === -1 || this.startIndex === 0 && this['preStartIndex'] === 0))) {
|
|
12100
12112
|
this.contents.scrollTop = 0;
|
|
12101
12113
|
this.isDataSourceChanged = false;
|
|
12102
12114
|
}
|