@syncfusion/ej2-treegrid 22.1.37 → 22.1.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 +10 -0
- 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 +14 -11
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +14 -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 +6 -1
- package/src/treegrid/actions/selection.js +0 -1
- package/src/treegrid/actions/virtual-scroll.js +2 -2
- package/src/treegrid/renderer/virtual-tree-content-render.js +6 -6
|
@@ -1394,9 +1394,7 @@ var Selection = /** @__PURE__ @class */ (function () {
|
|
|
1394
1394
|
if (recordIndex > -1) {
|
|
1395
1395
|
if (!isNullOrUndefined(checkbox)) {
|
|
1396
1396
|
checkbox.classList.add(checkBoxclass);
|
|
1397
|
-
var chkstate = checkState === 'check' ? 'checked' : checkState === 'uncheck' ? 'unchecked' : 'mixed';
|
|
1398
1397
|
tr.querySelector('.e-treecheckselect').setAttribute('aria-checked', checkState === 'check' ? 'true' : checkState === 'uncheck' ? 'false' : 'mixed');
|
|
1399
|
-
tr.querySelector('.e-frame').setAttribute('title', 'checkbox' + chkstate);
|
|
1400
1398
|
}
|
|
1401
1399
|
}
|
|
1402
1400
|
};
|
|
@@ -12437,7 +12435,8 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12437
12435
|
this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
|
|
12438
12436
|
}
|
|
12439
12437
|
}
|
|
12440
|
-
if (this.isAddedRowByMethod
|
|
12438
|
+
if ((this.isAddedRowByMethod || (this.isAddedRowByContextMenu && this.parent.grid.selectedRowIndex !== -1)) &&
|
|
12439
|
+
(this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
12441
12440
|
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
12442
12441
|
if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
|
|
12443
12442
|
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
@@ -12455,6 +12454,10 @@ var Edit$1 = /** @__PURE__ @class */ (function () {
|
|
|
12455
12454
|
&& !isNullOrUndefined(this.parent.getSelectedRecords()[0])) {
|
|
12456
12455
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
12457
12456
|
}
|
|
12457
|
+
if (isNullOrUndefined(this.addRowRecord) && this.parent.getCurrentViewRecords().length > this.addRowIndex &&
|
|
12458
|
+
args.requestType === 'save' && this.parent.getSelectedRecords().length !== 0) {
|
|
12459
|
+
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
12460
|
+
}
|
|
12458
12461
|
this.isAddedRowByMethod = false;
|
|
12459
12462
|
args = this.beginAddEdit(args);
|
|
12460
12463
|
// if (args.requestType === 'save' &&
|
|
@@ -12915,7 +12918,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
12915
12918
|
};
|
|
12916
12919
|
VirtualTreeContentRenderer.prototype.indexModifier = function (args) {
|
|
12917
12920
|
var content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12918
|
-
if (this.recordAdded && this.startIndex > -1 && this.endIndex > -1) {
|
|
12921
|
+
if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
|
|
12919
12922
|
if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
|
|
12920
12923
|
var nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12921
12924
|
var lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
@@ -13256,11 +13259,11 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13256
13259
|
firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
|
|
13257
13260
|
}
|
|
13258
13261
|
if (firsttdinx === 0) {
|
|
13262
|
+
scrollArgs.offset.top = content$$1.scrollTop;
|
|
13259
13263
|
if (this.parent.allowRowDragAndDrop) {
|
|
13260
13264
|
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
13261
13265
|
}
|
|
13262
13266
|
else {
|
|
13263
|
-
scrollArgs.offset.top = content$$1.scrollTop;
|
|
13264
13267
|
this.translateY = scrollArgs.offset.top;
|
|
13265
13268
|
}
|
|
13266
13269
|
}
|
|
@@ -13295,12 +13298,12 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
|
|
|
13295
13298
|
this.translateY = this.getTranslateY(scrollArgs.offset.top, content$$1.getBoundingClientRect().height);
|
|
13296
13299
|
}
|
|
13297
13300
|
else {
|
|
13298
|
-
if (this.
|
|
13299
|
-
this.translateY =
|
|
13301
|
+
if (this.totalRecords === this.endIndex) {
|
|
13302
|
+
this.translateY = (this.totalRecords * rowHeight) - ((this.endIndex - this.startIndex) * rowHeight);
|
|
13300
13303
|
}
|
|
13301
13304
|
else {
|
|
13302
|
-
if (this.
|
|
13303
|
-
this.translateY =
|
|
13305
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
13306
|
+
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
13304
13307
|
}
|
|
13305
13308
|
else {
|
|
13306
13309
|
this.translateY = scrollArgs.offset.top;
|
|
@@ -13623,7 +13626,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13623
13626
|
});
|
|
13624
13627
|
this.visualData = visualData;
|
|
13625
13628
|
this.parent.grid.notify(dataListener, { data: visualData });
|
|
13626
|
-
var counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count };
|
|
13629
|
+
var counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count, requestType: pageingDetails.actionArgs.requestType };
|
|
13627
13630
|
this.parent.grid.notify(indexModifier, counts);
|
|
13628
13631
|
var startIndex = counts.startIndex;
|
|
13629
13632
|
var endIndex = counts.endIndex;
|
|
@@ -13646,7 +13649,7 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
|
|
|
13646
13649
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13647
13650
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13648
13651
|
}
|
|
13649
|
-
if (requestType === 'save' || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13652
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13650
13653
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13651
13654
|
endIndex = counts.count;
|
|
13652
13655
|
this.parent['isAddedFromGantt'] = false;
|