@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.
@@ -11361,10 +11361,11 @@ class BatchEdit {
11361
11361
  let data;
11362
11362
  let childs;
11363
11363
  let uid;
11364
- if (!isNullOrUndefined(args.row) && this.parent.getSelectedRows().indexOf(args.row) === -1) {
11364
+ const rowElement = Array.isArray(args.row) ? args.row[0] : args.row;
11365
+ if (!isNullOrUndefined(rowElement) && this.parent.getSelectedRows().indexOf(rowElement) === -1) {
11365
11366
  data = args.rowData;
11366
11367
  childs = findChildrenRecords(data);
11367
- uid = args.row.getAttribute('data-uid');
11368
+ uid = rowElement.getAttribute('data-uid');
11368
11369
  }
11369
11370
  else {
11370
11371
  data = this.parent.grid.getSelectedRecords()[this.parent.grid.getSelectedRecords().length - 1];
@@ -12404,7 +12405,7 @@ class Edit {
12404
12405
  args.cancel = true;
12405
12406
  return;
12406
12407
  }
12407
- if (this.doubleClickTarget && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
12408
+ if (this.doubleClickTarget && args.requestType !== 'delete' && (this.doubleClickTarget.classList.contains('e-treegridexpand') ||
12408
12409
  this.doubleClickTarget.classList.contains('e-treegridcollapse') || this.doubleClickTarget.classList.contains('e-frame'))) {
12409
12410
  args.cancel = true;
12410
12411
  this.doubleClickTarget = null;
@@ -13255,13 +13256,14 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
13255
13256
  - this.parent.pageSettings.pageSize;
13256
13257
  index = (index > 0) ? index : 0;
13257
13258
  if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 && index !== this[`${selectedRowIndex}`] &&
13258
- ((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)) {
13259
13261
  index = this[`${selectedRowIndex}`];
13260
13262
  }
13261
13263
  this.startIndex = index;
13262
13264
  this.endIndex = index + this.parent.pageSettings.pageSize;
13263
13265
  if (this.endIndex > this.totalRecords) {
13264
- const lastInx = this.totalRecords - 1;
13266
+ const lastInx = this.totalRecords;
13265
13267
  const remains = this.endIndex % lastInx;
13266
13268
  this.endIndex = lastInx;
13267
13269
  this.startIndex = (this.startIndex - remains) < 0 ? 0 : (this.startIndex - remains);
@@ -13299,7 +13301,7 @@ class VirtualTreeContentRenderer extends VirtualContentRenderer {
13299
13301
  let nextSetResIndex = ~~(content.scrollTop / rowHeight);
13300
13302
  const isLastBlock = (this[`${selectedRowIndex}`] + this.parent.pageSettings.pageSize) < this.totalRecords ? false : true;
13301
13303
  if (!isNullOrUndefined(this[`${selectedRowIndex}`]) && this[`${selectedRowIndex}`] !== -1 &&
13302
- nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock) {
13304
+ nextSetResIndex !== this[`${selectedRowIndex}`] && !isLastBlock && !(this.parent.root && this.parent.root.treeGrid && this.parent.root.treeGrid.isGantt)) {
13303
13305
  nextSetResIndex = this[`${selectedRowIndex}`];
13304
13306
  }
13305
13307
  let lastIndex = nextSetResIndex + this.parent.pageSettings.pageSize;