@syncfusion/ej2-treegrid 25.1.38 → 25.1.41

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.
@@ -1992,7 +1992,8 @@ var Render = /** @__PURE__ @class */ (function () {
1992
1992
  var cellIndex = _this.parent.grid.getNormalizedColumnIndex(columnUid);
1993
1993
  if (rows.length !== 0) {
1994
1994
  for (var j = 0; j < rowsObj.length; j++) {
1995
- if (rowsObj[parseInt(j.toString(), 10)].isDataRow && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1995
+ if (rowsObj[parseInt(j.toString(), 10)].isDataRow
1996
+ && !isNullOrUndefined(rowsObj[parseInt(j.toString(), 10)].index)) {
1996
1997
  var cell = rowsObj[parseInt(j.toString(), 10)]["" + cells][parseInt(cellIndex.toString(), 10)];
1997
1998
  var cellRenderer = new CellRenderer(_this.parent.grid, _this.parent.grid.serviceLocator);
1998
1999
  var td = _this.parent.getCellFromIndex(rowsObj[parseInt(j.toString(), 10)].index, cellIndex - indent);
@@ -7191,7 +7192,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7191
7192
  }
7192
7193
  };
7193
7194
  TreeGrid.prototype.collapseRemoteChild = function (rowDetails, isChild) {
7194
- if (!isChild) {
7195
+ if (!isNullOrUndefined(isChild) && !isChild && !this.loadChildOnDemand) {
7195
7196
  rowDetails.record.expanded = false;
7196
7197
  }
7197
7198
  var rows = rowDetails.rows;
@@ -7858,7 +7859,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7858
7859
  Property(false)
7859
7860
  ], TreeGrid.prototype, "enableColumnVirtualization", void 0);
7860
7861
  __decorate([
7861
- Property(true)
7862
+ Property(false)
7862
7863
  ], TreeGrid.prototype, "enableHtmlSanitizer", void 0);
7863
7864
  __decorate([
7864
7865
  Property(false)
@@ -9689,7 +9690,8 @@ var TreeVirtualRowModelGenerator = /** @__PURE__ @class */ (function (_super) {
9689
9690
  var rows = _super.prototype.generateRows.call(this, data, notifyArgs);
9690
9691
  if (!isNullOrUndefined((this.visualData))) {
9691
9692
  for (var r = 0; r < rows.length; r++) {
9692
- rows[parseInt(r.toString(), 10)].index = (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
9693
+ rows[parseInt(r.toString(), 10)].index =
9694
+ (this.visualData).indexOf(rows[parseInt(r.toString(), 10)].data);
9693
9695
  }
9694
9696
  }
9695
9697
  return rows;
@@ -10096,7 +10098,7 @@ var ExcelExport$1 = /** @__PURE__ @class */ (function () {
10096
10098
  if (!this.isLocal()) {
10097
10099
  this.parent.flatData = [];
10098
10100
  }
10099
- if (property && property.dataSource && this.isLocal()) {
10101
+ if (property && property.dataSource) {
10100
10102
  var flatsData = this.parent.flatData;
10101
10103
  var dataSrc = property.dataSource instanceof DataManager ? property.dataSource.dataSource.json : property.dataSource;
10102
10104
  this.parent.dataModule.convertToFlatData(dataSrc);
@@ -13230,7 +13232,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13230
13232
  VirtualTreeContentRenderer.prototype.dataBoundEvent = function () {
13231
13233
  var dataBoundEve = 'dataBound';
13232
13234
  var initialRowTop = 'initialRowTop';
13233
- if (!isNullOrUndefined(this.parent.getRowByIndex(0)) && this.parent.getRows().length && !this["" + initialRowTop]) {
13235
+ if (this.parent.getRows().length && !isNullOrUndefined(this.parent.getRowByIndex(0)) && !this["" + initialRowTop]) {
13234
13236
  var rowTop = this.parent.getRowByIndex(0).getBoundingClientRect().top;
13235
13237
  var gridTop = this.parent.element.getBoundingClientRect().top;
13236
13238
  if (rowTop > 0) {
@@ -13454,13 +13456,8 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13454
13456
  firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
13455
13457
  }
13456
13458
  if (firsttdinx === 0) {
13457
- scrollArgs.offset.top = content$$1.scrollTop;
13458
- if (this.parent.allowRowDragAndDrop) {
13459
- this.translateY = scrollArgs.offset.top - rowHeight * 2;
13460
- }
13461
- else {
13462
- this.translateY = scrollArgs.offset.top;
13463
- }
13459
+ this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
13460
+ scrollArgs.offset.top - (outBuffer * this.parent.getRowHeight()) + 10 : 0;
13464
13461
  }
13465
13462
  else {
13466
13463
  this.translateY = (scrollArgs.offset.top - (outBuffer * rowHeight) > 0) ?
@@ -13514,6 +13511,9 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13514
13511
  this.previousInfo = viewInfo;
13515
13512
  this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []);
13516
13513
  var page = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page;
13514
+ if (downScroll && this.endIndex === this.totalRecords && viewInfo.loadNext) {
13515
+ viewInfo.loadNext = false;
13516
+ }
13517
13517
  this.parent.setProperties({ pageSettings: { currentPage: page } }, true);
13518
13518
  this.requestType = 'virtualscroll';
13519
13519
  if (scrollArgs.direction !== 'right' && scrollArgs.direction !== 'left') {
@@ -13834,14 +13834,14 @@ var VirtualScroll$1 = /** @__PURE__ @class */ (function () {
13834
13834
  }
13835
13835
  if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
13836
13836
  var modifiedStartIndex = counts.startIndex + (counts.count - counts.endIndex);
13837
- if (counts.startIndex <= modifiedStartIndex && counts.endIndex <= modifiedStartIndex) {
13838
- startIndex = counts.startIndex;
13839
- endIndex = counts.endIndex;
13840
- }
13841
- else {
13837
+ if (counts.count - counts.startIndex <= this.parent.grid.pageSettings.pageSize) {
13842
13838
  startIndex = modifiedStartIndex;
13843
13839
  endIndex = counts.count;
13844
13840
  }
13841
+ else {
13842
+ startIndex = counts.startIndex;
13843
+ endIndex = counts.endIndex;
13844
+ }
13845
13845
  this.parent['isAddedFromGantt'] = false;
13846
13846
  }
13847
13847
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&