@syncfusion/ej2-treegrid 27.1.48 → 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.
@@ -11765,10 +11765,11 @@ var BatchEdit = /** @__PURE__ @class */ (function () {
11765
11765
  var data;
11766
11766
  var childs;
11767
11767
  var uid;
11768
- if (!isNullOrUndefined(args.row) && this.parent.getSelectedRows().indexOf(args.row) === -1) {
11768
+ var rowElement = Array.isArray(args.row) ? args.row[0] : args.row;
11769
+ if (!isNullOrUndefined(rowElement) && this.parent.getSelectedRows().indexOf(rowElement) === -1) {
11769
11770
  data = args.rowData;
11770
11771
  childs = findChildrenRecords(data);
11771
- uid = args.row.getAttribute('data-uid');
11772
+ uid = rowElement.getAttribute('data-uid');
11772
11773
  }
11773
11774
  else {
11774
11775
  data = this.parent.grid.getSelectedRecords()[this.parent.grid.getSelectedRecords().length - 1];
@@ -12812,7 +12813,7 @@ var Edit = /** @__PURE__ @class */ (function () {
12812
12813
  args.cancel = true;
12813
12814
  return;
12814
12815
  }
12815
- if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
12816
+ if (this.doubleClickTarget && args.requestType !== 'delete' && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
12816
12817
  this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame'))) {
12817
12818
  args.cancel = true;
12818
12819
  this.doubleClickTarget = null;
@@ -13687,13 +13688,14 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13687
13688
  - this.parent.pageSettings.pageSize;
13688
13689
  index = (index > 0) ? index : 0;
13689
13690
  if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 && index !== this["" + selectedRowIndex] &&
13690
- ((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)) {
13691
13693
  index = this["" + selectedRowIndex];
13692
13694
  }
13693
13695
  this.startIndex = index;
13694
13696
  this.endIndex = index + this.parent.pageSettings.pageSize;
13695
13697
  if (this.endIndex > this.totalRecords) {
13696
- var lastInx = this.totalRecords - 1;
13698
+ var lastInx = this.totalRecords;
13697
13699
  var remains = this.endIndex % lastInx;
13698
13700
  this.endIndex = lastInx;
13699
13701
  this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
@@ -13731,7 +13733,7 @@ var VirtualTreeContentRenderer = /** @__PURE__ @class */ (function (_super) {
13731
13733
  var nextSetResIndex = ~~(content.scrollTop / rowHeight);
13732
13734
  var isLastBlock = (this["" + selectedRowIndex] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
13733
13735
  if (!isNullOrUndefined(this["" + selectedRowIndex]) && this["" + selectedRowIndex] !== -1 &&
13734
- nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock) {
13736
+ nextSetResIndex !== this["" + selectedRowIndex] && !isLastBlock && !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13735
13737
  nextSetResIndex = this["" + selectedRowIndex];
13736
13738
  }
13737
13739
  var lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;