@syncfusion/ej2-treegrid 22.1.37 → 22.1.39
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 +18 -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 +15 -12
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +15 -12
- 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 +3 -3
- package/src/treegrid/renderer/virtual-tree-content-render.js +6 -6
|
@@ -1276,9 +1276,7 @@ class Selection {
|
|
|
1276
1276
|
if (recordIndex > -1) {
|
|
1277
1277
|
if (!isNullOrUndefined(checkbox)) {
|
|
1278
1278
|
checkbox.classList.add(checkBoxclass);
|
|
1279
|
-
const chkstate = checkState === 'check' ? 'checked' : checkState === 'uncheck' ? 'unchecked' : 'mixed';
|
|
1280
1279
|
tr.querySelector('.e-treecheckselect').setAttribute('aria-checked', checkState === 'check' ? 'true' : checkState === 'uncheck' ? 'false' : 'mixed');
|
|
1281
|
-
tr.querySelector('.e-frame').setAttribute('title', 'checkbox' + chkstate);
|
|
1282
1280
|
}
|
|
1283
1281
|
}
|
|
1284
1282
|
}
|
|
@@ -12030,7 +12028,8 @@ class Edit$1 {
|
|
|
12030
12028
|
this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
|
|
12031
12029
|
}
|
|
12032
12030
|
}
|
|
12033
|
-
if (this.isAddedRowByMethod
|
|
12031
|
+
if ((this.isAddedRowByMethod || (this.isAddedRowByContextMenu && this.parent.grid.selectedRowIndex !== -1)) &&
|
|
12032
|
+
(this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
|
|
12034
12033
|
this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
|
|
12035
12034
|
if (this.parent.enableVirtualization && this.isAddedRowByContextMenu) {
|
|
12036
12035
|
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
@@ -12048,6 +12047,10 @@ class Edit$1 {
|
|
|
12048
12047
|
&& !isNullOrUndefined(this.parent.getSelectedRecords()[0])) {
|
|
12049
12048
|
this.addRowRecord = this.parent.getSelectedRecords()[0];
|
|
12050
12049
|
}
|
|
12050
|
+
if (isNullOrUndefined(this.addRowRecord) && this.parent.getCurrentViewRecords().length > this.addRowIndex &&
|
|
12051
|
+
args.requestType === 'save' && this.parent.getSelectedRecords().length !== 0) {
|
|
12052
|
+
this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
|
|
12053
|
+
}
|
|
12051
12054
|
this.isAddedRowByMethod = false;
|
|
12052
12055
|
args = this.beginAddEdit(args);
|
|
12053
12056
|
// if (args.requestType === 'save' &&
|
|
@@ -12490,7 +12493,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12490
12493
|
}
|
|
12491
12494
|
indexModifier(args) {
|
|
12492
12495
|
const content$$1 = this.parent.getContent().querySelector('.e-content');
|
|
12493
|
-
if (this.recordAdded && this.startIndex > -1 && this.endIndex > -1) {
|
|
12496
|
+
if ((this.recordAdded || args.requestType === 'delete' && this.endIndex > args.count - this.parent.pageSettings.pageSize) && this.startIndex > -1 && this.endIndex > -1) {
|
|
12494
12497
|
if (this.endIndex > args.count - this.parent.pageSettings.pageSize) {
|
|
12495
12498
|
const nextSetResIndex = ~~(content$$1.scrollTop / this.parent.getRowHeight());
|
|
12496
12499
|
let lastIndex = nextSetResIndex + this.parent.getRows().length;
|
|
@@ -12829,11 +12832,11 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12829
12832
|
firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
|
|
12830
12833
|
}
|
|
12831
12834
|
if (firsttdinx === 0) {
|
|
12835
|
+
scrollArgs.offset.top = content$$1.scrollTop;
|
|
12832
12836
|
if (this.parent.allowRowDragAndDrop) {
|
|
12833
12837
|
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
12834
12838
|
}
|
|
12835
12839
|
else {
|
|
12836
|
-
scrollArgs.offset.top = content$$1.scrollTop;
|
|
12837
12840
|
this.translateY = scrollArgs.offset.top;
|
|
12838
12841
|
}
|
|
12839
12842
|
}
|
|
@@ -12868,12 +12871,12 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
|
|
|
12868
12871
|
this.translateY = this.getTranslateY(scrollArgs.offset.top, content$$1.getBoundingClientRect().height);
|
|
12869
12872
|
}
|
|
12870
12873
|
else {
|
|
12871
|
-
if (this.
|
|
12872
|
-
this.translateY =
|
|
12874
|
+
if (this.totalRecords === this.endIndex) {
|
|
12875
|
+
this.translateY = (this.totalRecords * rowHeight) - ((this.endIndex - this.startIndex) * rowHeight);
|
|
12873
12876
|
}
|
|
12874
12877
|
else {
|
|
12875
|
-
if (this.
|
|
12876
|
-
this.translateY =
|
|
12878
|
+
if (this.parent.allowRowDragAndDrop) {
|
|
12879
|
+
this.translateY = scrollArgs.offset.top - rowHeight * 2;
|
|
12877
12880
|
}
|
|
12878
12881
|
else {
|
|
12879
12882
|
this.translateY = scrollArgs.offset.top;
|
|
@@ -13176,12 +13179,12 @@ class VirtualScroll$1 {
|
|
|
13176
13179
|
return getExpandStatus(this.parent, e, parents);
|
|
13177
13180
|
});
|
|
13178
13181
|
this.visualData = visualData;
|
|
13182
|
+
pageingDetails.count = visualData.length;
|
|
13179
13183
|
this.parent.grid.notify(dataListener, { data: visualData });
|
|
13180
|
-
const counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count };
|
|
13184
|
+
const counts = { startIndex: -1, endIndex: -1, count: pageingDetails.count, requestType: pageingDetails.actionArgs.requestType };
|
|
13181
13185
|
this.parent.grid.notify(indexModifier, counts);
|
|
13182
13186
|
let startIndex = counts.startIndex;
|
|
13183
13187
|
let endIndex = counts.endIndex;
|
|
13184
|
-
pageingDetails.count = visualData.length;
|
|
13185
13188
|
if (startIndex === -1 && endIndex === -1) {
|
|
13186
13189
|
let query = new Query();
|
|
13187
13190
|
const size = this.parent.grid.pageSettings.pageSize;
|
|
@@ -13200,7 +13203,7 @@ class VirtualScroll$1 {
|
|
|
13200
13203
|
this.parent.grid.getContent().firstElementChild.scrollTop = 0;
|
|
13201
13204
|
this.parent.grid.notify(virtualActionArgs, { setTop: true });
|
|
13202
13205
|
}
|
|
13203
|
-
if (requestType === 'save' || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13206
|
+
if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
|
|
13204
13207
|
startIndex = counts.startIndex + (counts.count - counts.endIndex);
|
|
13205
13208
|
endIndex = counts.count;
|
|
13206
13209
|
this.parent['isAddedFromGantt'] = false;
|