@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.
@@ -13256,13 +13256,14 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
13256
13256
  - this.parent.pageSettings.pageSize;
13257
13257
  index = (index > 0) ? index : 0;
13258
13258
  if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
13259
- ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop)) {
13259
+ ((this.parent.rowHeight * this.parent.pageSettings.pageSize) < content.scrollTop) &&
13260
+ !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13260
13261
  index = this[`${selectedRowIndex}`];
13261
13262
  }
13262
13263
  this.startIndex = index;
13263
13264
  this.endIndex = index + this.parent.pageSettings.pageSize;
13264
13265
  if (this.endIndex > this.totalRecords) {
13265
- const lastInx = this.totalRecords - 1;
13266
+ const lastInx = this.totalRecords;
13266
13267
  const remains = this.endIndex % lastInx;
13267
13268
  this.endIndex = lastInx;
13268
13269
  this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
@@ -13300,7 +13301,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
13300
13301
  let nextSetResIndex = ~~(content.scrollTop / rowHeight);
13301
13302
  const isLastBlock = (this[`${selectedRowIndex}`] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
13302
13303
  if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 &&
13303
- nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock) {
13304
+ nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock && !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13304
13305
  nextSetResIndex = this[`${selectedRowIndex}`];
13305
13306
  }
13306
13307
  let lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;