@syncfusion/ej2-treegrid 33.2.10 → 33.2.12

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.
@@ -15963,6 +15963,10 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
15963
15963
  this.parent.root.scrollPosition = scrollArgs.offset;
15964
15964
  }
15965
15965
  var info = scrollArgs.sentinel;
15966
+ var treeGridParent = null;
15967
+ if (this.parent.clipboardModule && this.parent.clipboardModule['treeGridParent']) {
15968
+ treeGridParent = this.parent.clipboardModule['treeGridParent'];
15969
+ }
15966
15970
  var rowHeight = parseInt(this.parent.getRowHeight().toString(), 10);
15967
15971
  var outBuffer = this.parent.pageSettings.pageSize - Math.ceil(this.parent.pageSettings.pageSize / 2);
15968
15972
  var content;
@@ -16040,7 +16044,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
16040
16044
  else if (downScroll && (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') && !isNullOrUndefined(content)) {
16041
16045
  var nextSetResIndex = ~~(content.scrollTop / rowHeight);
16042
16046
  var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
16043
- if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
16047
+ if (treeGridParent !== null && treeGridParent.isGantt && !isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
16044
16048
  nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock && !this.parent.allowRowDragAndDrop) {
16045
16049
  nextSetResIndex = this["" + selectedRowIndex];
16046
16050
  }
@@ -16151,6 +16155,15 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
16151
16155
  * @returns {void}
16152
16156
  */
16153
16157
  VirtualTreeContentRenderer.prototype.appendContent = function (target, newChild, e) {
16158
+ var treeGridParent = null;
16159
+ if (this.parent.clipboardModule && this.parent.clipboardModule['treeGridParent']) {
16160
+ treeGridParent = this.parent.clipboardModule['treeGridParent'];
16161
+ }
16162
+ var totalBlocks = this.getTotalBlocks();
16163
+ var lastPage = Math.ceil(totalBlocks / 2);
16164
+ var isBottom = (this.parent.pageSettings.currentPage === lastPage) &&
16165
+ (treeGridParent && treeGridParent.flatData &&
16166
+ treeGridParent.flatData.length === e.index + 1);
16154
16167
  if ((this.parent.dataSource instanceof DataManager && this.parent.dataSource.dataSource.url !== undefined
16155
16168
  && !this.parent.dataSource.dataSource.offline && this.parent.dataSource.dataSource.url !== '') || isCountRequired(this.parent)
16156
16169
  || (this.parent.isFrozenGrid() && (e.requestType === undefined || !isNullOrUndefined(e.virtualInfo) && (e.virtualInfo.direction === 'right' || e.virtualInfo.direction === 'left')))) {
@@ -16235,6 +16248,14 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
16235
16248
  }
16236
16249
  }
16237
16250
  }
16251
+ if ((treeGridParent !== null && !treeGridParent.isGantt) && e.action === 'add' && isBottom) {
16252
+ var rowHeight = this.parent.getRowHeight();
16253
+ var pageSize = this.parent.pageSettings.pageSize;
16254
+ var newTranslateY = (this.totalRecords * rowHeight) - (pageSize * rowHeight);
16255
+ this.translateY = newTranslateY > 0 ? newTranslateY : this.translateY;
16256
+ this.virtualEle.adjustTable(cOffset, this.translateY);
16257
+ this.content.scrollTop = this.translateY;
16258
+ }
16238
16259
  this.restoreEditState();
16239
16260
  _super.prototype["" + restoreAdd].call(this);
16240
16261
  _super.prototype["" + ensureSelectedRowPosition].call(this);