@syncfusion/ej2-treegrid 27.1.50 → 27.1.51

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.
@@ -13688,13 +13688,14 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13688
13688
  - this.parent.pageSettings.pageSize;
13689
13689
  index = (index > 0) ? index : 0;
13690
13690
  if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
13691
- ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
13691
+ ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop) &&
13692
+ !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13692
13693
  index = this["" + selectedRowIndex];
13693
13694
  }
13694
13695
  this.startIndex = index;
13695
13696
  this.endIndex = index + this.parent.pageSettings.pageSize;
13696
13697
  if (this.endIndex > this.totalRecords) {
13697
- var lastInx = this.totalRecords - 1;
13698
+ var lastInx = this.totalRecords;
13698
13699
  var remains = this.endIndex % lastInx;
13699
13700
  this.endIndex = lastInx;
13700
13701
  this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
@@ -13732,7 +13733,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13732
13733
  var nextSetResIndex = ~~(content.scrollTop / rowHeight);
13733
13734
  var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
13734
13735
  if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
13735
- nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
13736
+ nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock && !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13736
13737
  nextSetResIndex = this["" + selectedRowIndex];
13737
13738
  }
13738
13739
  var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;