@syncfusion/ej2-treegrid 20.2.36 → 20.2.40

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.
@@ -41,7 +41,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
41
41
  return new TreeVirtualRowModelGenerator(this.parent);
42
42
  };
43
43
  VirtualTreeContentRenderer.prototype.getRowByIndex = function (index) {
44
- return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('aria-rowindex'), 10) === index; })[0];
44
+ return this.parent.getDataRows().filter(function (e) { return parseInt(e.getAttribute('data-rowindex'), 10) === index; })[0];
45
45
  };
46
46
  VirtualTreeContentRenderer.prototype.addEventListener = function () {
47
47
  this.parent.on(events.virtualActionArgs, this.virtualOtherAction, this);
@@ -126,7 +126,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
126
126
  getValue('virtualEle', this).setVirtualHeight(this.parent.getRowHeight() * e.count, '100%');
127
127
  }
128
128
  }
129
- if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && this.startIndex === -1)) {
129
+ if ((!isNullOrUndefined(e.requestType) && e.requestType.toString() === 'collapseAll') || (this.isDataSourceChanged && (this.startIndex === -1 || this.startIndex === 0 && this['preStartIndex'] === 0))) {
130
130
  this.contents.scrollTop = 0;
131
131
  this.isDataSourceChanged = false;
132
132
  }
@@ -220,7 +220,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
220
220
  return new Cell(opt);
221
221
  };
222
222
  VirtualTreeContentRenderer.prototype.beginEdit = function (e) {
223
- var selector = '.e-row[aria-rowindex="' + e.index + '"]';
223
+ var selector = '.e-row[data-rowindex="' + e.index + '"]';
224
224
  var index = this.parent.getContent().querySelector(selector).rowIndex;
225
225
  var rowData = this.parent.getCurrentViewRecords()[index];
226
226
  e.data = rowData;
@@ -228,14 +228,14 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
228
228
  VirtualTreeContentRenderer.prototype.beginAdd = function (args) {
229
229
  var addAction = 'addActionBegin';
230
230
  var isAdd = 'isAdd';
231
- var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, ariaRowIndex: this.ariaRowIndex };
231
+ var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
232
232
  this.parent.notify('get-row-position', addArgs);
233
233
  this.rowPosition = addArgs.newRowPosition;
234
234
  this.addRowIndex = addArgs.addRowIndex;
235
- this.ariaRowIndex = addArgs.ariaRowIndex;
235
+ this.dataRowIndex = addArgs.dataRowIndex;
236
236
  var rows = this.parent.getRows();
237
- var firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') : 0;
238
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') : 0;
237
+ var firstAriaIndex = rows.length ? +rows[0].getAttribute('data-rowindex') : 0;
238
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
239
239
  var withInRange = this.parent.selectedRowIndex >= firstAriaIndex && this.parent.selectedRowIndex <= lastAriaIndex;
240
240
  if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
241
241
  this[isAdd] = true;
@@ -286,11 +286,11 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
286
286
  };
287
287
  VirtualTreeContentRenderer.prototype.onActionComplete = function (args) {
288
288
  if (args.requestType === 'add') {
289
- var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, ariaRowIndex: this.ariaRowIndex };
289
+ var addArgs = { newRowPosition: this.rowPosition, addRowIndex: this.addRowIndex, dataRowIndex: this.dataRowIndex };
290
290
  this.parent.notify('get-row-position', addArgs);
291
291
  this.rowPosition = addArgs.newRowPosition;
292
292
  this.addRowIndex = addArgs.addRowIndex;
293
- this.ariaRowIndex = addArgs.ariaRowIndex;
293
+ this.dataRowIndex = addArgs.dataRowIndex;
294
294
  }
295
295
  var actionComplete = 'actionComplete';
296
296
  _super.prototype[actionComplete].call(this, args);
@@ -353,7 +353,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
353
353
  !isNullOrUndefined(this.parent.getContent().querySelectorAll('.e-content tr')[rowPt])) {
354
354
  var attr = this.parent.getContent().querySelectorAll('.e-content tr')[rowPt]
355
355
  .querySelector('td').getAttribute('index');
356
- firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('aria-rowindex');
356
+ firsttdinx = +attr; // this.parent.getContent().querySelector('.e-content tr').getAttribute('data-rowindex');
357
357
  }
358
358
  if (firsttdinx === 0) {
359
359
  if (this.parent.allowRowDragAndDrop) {
@@ -452,7 +452,7 @@ var VirtualTreeContentRenderer = /** @class */ (function (_super) {
452
452
  var isAdd = 'isAdd';
453
453
  if (this[isAdd] && !this.parent.getContent().querySelector('.e-content').querySelector('.e-addedrow')) {
454
454
  if (!(this.rowPosition === 'Top' || this.rowPosition === 'Bottom')) {
455
- if (this.ariaRowIndex >= this.startIndex) {
455
+ if (this.dataRowIndex >= this.startIndex) {
456
456
  this.restoreNewRow();
457
457
  }
458
458
  else if (this.addRowIndex && this.addRowIndex > -1) {
@@ -121,7 +121,7 @@ export function findChildrenRecords(records) {
121
121
  return [];
122
122
  }
123
123
  if (!isNullOrUndefined(records.childRecords)) {
124
- var childRecords = records.childRecords;
124
+ var childRecords = records.childRecords.filter(function (items) { return !items.isSummaryRow; });
125
125
  var keys = Object.keys(childRecords);
126
126
  for (var i = 0, len = keys.length; i < len; i++) {
127
127
  datas.push(childRecords[i]);