@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 20.2.36
3
+ * version : 20.2.40
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@18.23.3",
3
+ "_id": "@syncfusion/ej2-treegrid@20.2.39",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-MoKO1I4KuhbqhrcUpyBSTMmzWIt3vmYZRD0X+sKPaRR5P7TwWi6FOhn+ZKN4VkOnKNbok9JnGUAFfiQHuz3GcA==",
5
+ "_integrity": "sha512-5rBNYV7TLamFp9Hc0N6hCtVjsqk1ZxtGLsP49vRZQRTAc2zps0a3OwOVsfGQkh6YTwyojMRNwsiV+GeHUXe+6w==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-treegrid/-/ej2-treegrid-18.23.3.tgz",
28
- "_shasum": "ffe68795f8136158a761877a163b5f8b0987f200",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.2.39.tgz",
28
+ "_shasum": "45ce481300501f03d225973a53a749b17c4fab18",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~20.2.36",
40
- "@syncfusion/ej2-data": "~20.2.36",
41
- "@syncfusion/ej2-grids": "~20.2.36",
42
- "@syncfusion/ej2-popups": "~20.2.36"
39
+ "@syncfusion/ej2-base": "~20.2.39",
40
+ "@syncfusion/ej2-data": "~20.2.38",
41
+ "@syncfusion/ej2-grids": "~20.2.40",
42
+ "@syncfusion/ej2-popups": "~20.2.40"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "20.2.36",
63
+ "version": "20.2.40",
64
64
  "sideEffects": false
65
65
  }
@@ -237,10 +237,11 @@ var BatchEdit = /** @class */ (function () {
237
237
  this.parent.editModule[isTabLastRow] = false;
238
238
  return;
239
239
  }
240
- if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && this.parent.grid.selectedRowIndex === -1) {
240
+ if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) &&
241
+ !this.parent.editModule['isAddedRowByContextMenu'] && (this.parent.grid.selectedRowIndex === -1 || this.parent.editModule['batchEditModule'].isAdd)) {
241
242
  this.selectedIndex = this.parent.editModule['selectedIndex'];
242
243
  this.addRowIndex = this.parent.editModule['addRowIndex'];
243
- this.addRowRecord = this.parent.getCurrentViewRecords()[this.selectedIndex];
244
+ this.addRowRecord = this.batchRecords.length ? this.batchRecords[this.selectedIndex] : this.parent.getCurrentViewRecords()[this.selectedIndex];
244
245
  }
245
246
  else {
246
247
  this.selectedIndex = this.parent.grid.selectedRowIndex;
@@ -287,6 +288,11 @@ var BatchEdit = /** @class */ (function () {
287
288
  // }
288
289
  }
289
290
  focusModule.getContent().matrix.current = [actualIndex, focusModule.getContent().matrix.current[1]];
291
+ if (this.parent.editModule['isAddedRowByMethod'] && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
292
+ var newlyAddedRecords = this.parent.getBatchChanges()['addedRecords'];
293
+ var index = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[newlyAddedRecords.length - 1].getAttribute('data-rowindex'), 10);
294
+ this.batchRecords.splice(index, 0, newlyAddedRecords[newlyAddedRecords.length - 1]);
295
+ }
290
296
  }
291
297
  };
292
298
  BatchEdit.prototype.beforeBatchDelete = function (args) {
@@ -312,7 +318,7 @@ var BatchEdit = /** @class */ (function () {
312
318
  childs = findChildrenRecords(data);
313
319
  uid = this.parent.getSelectedRows()[0].getAttribute('data-uid');
314
320
  }
315
- var parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('aria-rowindex'), 10);
321
+ var parentRowIndex = parseInt(this.parent.grid.getRowElementByUID(uid).getAttribute('data-rowindex'), 10);
316
322
  if (childs.length) {
317
323
  var totalCount = parentRowIndex + childs.length;
318
324
  var firstChildIndex = parentRowIndex + 1;
@@ -349,7 +355,7 @@ var BatchEdit = /** @class */ (function () {
349
355
  BatchEdit.prototype.updateRowIndex = function () {
350
356
  var rows = this.parent.grid.getDataRows();
351
357
  for (var i = 0; i < rows.length; i++) {
352
- rows[i].setAttribute('aria-rowindex', i.toString());
358
+ rows[i].setAttribute('data-rowindex', i.toString());
353
359
  }
354
360
  var freeze = (this.parent.getFrozenLeftColumnsCount() > 0 ||
355
361
  this.parent.getFrozenRightColumnsCount() > 0) ? true : false;
@@ -357,9 +363,9 @@ var BatchEdit = /** @class */ (function () {
357
363
  var mRows = this.parent.grid.getMovableDataRows();
358
364
  var freezeRightRows = this.parent.grid.getFrozenRightDataRows();
359
365
  for (var i = 0; i < mRows.length; i++) {
360
- mRows[i].setAttribute('aria-rowindex', i.toString());
366
+ mRows[i].setAttribute('data-rowindex', i.toString());
361
367
  if (freeze) {
362
- freezeRightRows[i].setAttribute('aria-rowindex', i.toString());
368
+ freezeRightRows[i].setAttribute('data-rowindex', i.toString());
363
369
  }
364
370
  }
365
371
  }
@@ -419,7 +425,9 @@ var BatchEdit = /** @class */ (function () {
419
425
  if (!isNullOrUndefined(this.batchAddedRecords)) {
420
426
  for (var i = 0; i < this.batchAddedRecords.length; i++) {
421
427
  index = data.map(function (e) { return e[primaryKey]; }).indexOf(this.batchAddedRecords[i][primaryKey]);
422
- data.splice(index, 1);
428
+ if (index !== -1) {
429
+ data.splice(index, 1);
430
+ }
423
431
  if (this.parent.editSettings.newRowPosition === 'Child') {
424
432
  index = currentViewRecords.map(function (e) { return e[primaryKey]; })
425
433
  .indexOf(this.batchAddedRecords[i][parentItem] ? this.batchAddedRecords[i][parentItem][primaryKey]
@@ -485,9 +493,12 @@ var BatchEdit = /** @class */ (function () {
485
493
  }
486
494
  if (this.parent.editSettings.newRowPosition !== 'Bottom' && !Object.hasOwnProperty.call(args, 'updatedRecords')) {
487
495
  data.splice(data.length - addRecords.length, addRecords.length);
488
- if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex'])) {
489
- var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[0].getAttribute('aria-rowindex'), 10);
490
- data.splice(index_1, 0, addRecords[0]);
496
+ if (this.parent.editModule['isAddedRowByMethod'] && addRecords.length && !isNullOrUndefined(this.parent.editModule['addRowIndex']) && !this.parent.editModule['isAddedRowByContextMenu']) {
497
+ addRecords.reverse();
498
+ for (var i_1 = 0; i_1 < addRecords.length; i_1++) {
499
+ var index_1 = parseInt(this.parent.getContentTable().getElementsByClassName('e-insertedrow')[i_1].getAttribute('data-rowindex'), 10);
500
+ data.splice(index_1, 0, addRecords[i_1]);
501
+ }
491
502
  }
492
503
  if (!this.parent.allowPaging && data.length !== currentViewRecords.length) {
493
504
  if (currentViewRecords.length > addRecords.length) {
@@ -507,6 +518,9 @@ var BatchEdit = /** @class */ (function () {
507
518
  if (this.batchAddRowRecord.length === 0) {
508
519
  this.batchAddRowRecord.push(this.parent.flatData[args.index]);
509
520
  }
521
+ if (this.parent.editModule['isAddedRowByContextMenu']) {
522
+ addRecords.reverse();
523
+ }
510
524
  for (i = 0; i < addRecords.length; i++) {
511
525
  var taskData = extend({}, addRecords[i]);
512
526
  delete taskData.parentItem;
@@ -519,6 +533,11 @@ var BatchEdit = /** @class */ (function () {
519
533
  if (!isNullOrUndefined(taskData.primaryParent)) {
520
534
  delete taskData.primaryParent;
521
535
  }
536
+ if (addRecords.length > 1 && this.parent.editModule['isAddedRowByContextMenu']) {
537
+ var rowPosition = this.parent.editSettings.newRowPosition;
538
+ this.parent.editSettings.newRowPosition = this.parent.editModule['previousNewRowPosition'];
539
+ this.parent.editModule['previousNewRowPosition'] = rowPosition;
540
+ }
522
541
  addRecords[i].taskData = taskData;
523
542
  addRowRecord = this.batchAddRowRecord[i];
524
543
  if (isNullOrUndefined(addRowRecord)) {
@@ -558,15 +577,18 @@ var BatchEdit = /** @class */ (function () {
558
577
  }
559
578
  }
560
579
  this.parent.parentData = [];
561
- for (var i_1 = 0; i_1 < data.length; i_1++) {
562
- data[i_1][index] = i_1;
563
- setValue('uniqueIDCollection.' + data[i_1][uniqueID] + '.index', i_1, this.parent);
564
- if (!data[i_1][level]) {
565
- this.parent.parentData.push(data[i_1]);
580
+ for (var i_2 = 0; i_2 < data.length; i_2++) {
581
+ data[i_2][index] = i_2;
582
+ setValue('uniqueIDCollection.' + data[i_2][uniqueID] + '.index', i_2, this.parent);
583
+ if (!data[i_2][level]) {
584
+ this.parent.parentData.push(data[i_2]);
566
585
  }
567
586
  }
568
587
  }
569
588
  this.batchAddRowRecord = this.batchAddedRecords = this.batchRecords = this.batchDeletedRecords = this.currentViewRecords = [];
589
+ if (this.parent.editModule['isAddedRowByContextMenu']) {
590
+ this.parent.editModule['isAddedRowByContextMenu'] = false;
591
+ }
570
592
  };
571
593
  BatchEdit.prototype.getActualRowObjectIndex = function (index) {
572
594
  var rows = this.parent.grid.getDataRows();
@@ -93,6 +93,7 @@ var ContextMenu = /** @class */ (function () {
93
93
  if (args.item.id === 'Above' || args.item.id === 'Below' || args.item.id === 'Child') {
94
94
  this.parent.notify('savePreviousRowPosition', args);
95
95
  this.parent.setProperties({ editSettings: { newRowPosition: args.item.id } }, true);
96
+ this.parent.editModule['isAddedRowByContextMenu'] = true;
96
97
  this.parent.addRecord();
97
98
  }
98
99
  if (args.item.id === this.parent.element.id + '_gridcontrol_cmenu_Indent' || args.item.id === this.parent.element.id + '_gridcontrol_cmenu_Outdent') {
@@ -22,6 +22,7 @@ export declare class Edit {
22
22
  private isTabLastRow;
23
23
  private prevAriaRowIndex;
24
24
  private isAddedRowByMethod;
25
+ private isAddedRowByContextMenu;
25
26
  /**
26
27
  * Constructor for Edit module
27
28
  *
@@ -21,6 +21,7 @@ var Edit = /** @class */ (function () {
21
21
  this.deletedRecords = 'deletedRecords';
22
22
  this.prevAriaRowIndex = '-1';
23
23
  this.isAddedRowByMethod = false;
24
+ this.isAddedRowByContextMenu = false;
24
25
  Grid.Inject(GridEdit);
25
26
  this.parent = parent;
26
27
  this.isSelfReference = !isNullOrUndefined(parent.parentIdMapping);
@@ -71,7 +72,7 @@ var Edit = /** @class */ (function () {
71
72
  Edit.prototype.getRowPosition = function (addArgs) {
72
73
  addArgs.newRowPosition = this.parent.editSettings.newRowPosition;
73
74
  addArgs.addRowIndex = this.addRowIndex;
74
- addArgs.ariaRowIndex = +this.prevAriaRowIndex;
75
+ addArgs.dataRowIndex = +this.prevAriaRowIndex;
75
76
  };
76
77
  Edit.prototype.beforeStartEdit = function (args) {
77
78
  this.parent.trigger(events.actionBegin, args);
@@ -227,7 +228,7 @@ var Edit = /** @class */ (function () {
227
228
  if (!(this.parent.grid.editSettings.allowEditing) || this.parent.grid.isEdit) {
228
229
  return;
229
230
  }
230
- var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('aria-colindex'));
231
+ var column = this.parent.grid.getColumnByIndex(+target.closest('td.e-rowcell').getAttribute('data-colindex'));
231
232
  if (this.parent.editSettings.mode === 'Cell' && !this.isOnBatch && column && !column.isPrimaryKey &&
232
233
  this.parent.editSettings.allowEditing && column.allowEditing && !(target.classList.contains('e-treegridexpand') ||
233
234
  target.classList.contains('e-treegridcollapse')) && this.parent.editSettings.allowEditOnDblClick) {
@@ -235,8 +236,8 @@ var Edit = /** @class */ (function () {
235
236
  this.parent.grid.setProperties({ selectedRowIndex: args.rowIndex }, true);
236
237
  if (this.parent.enableVirtualization) {
237
238
  var tr = parentsUntil(args.target, 'e-row');
238
- this.prevAriaRowIndex = tr.getAttribute('aria-rowindex');
239
- tr.setAttribute('aria-rowindex', tr.rowIndex + '');
239
+ this.prevAriaRowIndex = tr.getAttribute('data-rowindex');
240
+ tr.setAttribute('data-rowindex', tr.rowIndex + '');
240
241
  }
241
242
  this.updateGridEditMode('Batch');
242
243
  }
@@ -276,7 +277,7 @@ var Edit = /** @class */ (function () {
276
277
  var prom = args[promise];
277
278
  delete args[promise];
278
279
  if (this.parent.enableVirtualization && !isNullOrUndefined(this.prevAriaRowIndex) && this.prevAriaRowIndex !== '-1') {
279
- args.row.setAttribute('aria-rowindex', this.prevAriaRowIndex);
280
+ args.row.setAttribute('data-rowindex', this.prevAriaRowIndex);
280
281
  this.prevAriaRowIndex = undefined;
281
282
  }
282
283
  if (this.keyPress !== 'enter') {
@@ -532,9 +533,11 @@ var Edit = /** @class */ (function () {
532
533
  this.parent.parentData.push(data[i]);
533
534
  }
534
535
  }
535
- if (details.action === 'add' && this.previousNewRowPosition != null) {
536
- this.parent.setProperties({ editSettings: { newRowPosition: this.previousNewRowPosition } }, true);
537
- this.previousNewRowPosition = null;
536
+ if (!this.parent.enableInfiniteScrolling) {
537
+ if (details.action === 'add' && this.previousNewRowPosition != null) {
538
+ this.parent.setProperties({ editSettings: { newRowPosition: this.previousNewRowPosition } }, true);
539
+ this.previousNewRowPosition = null;
540
+ }
538
541
  }
539
542
  };
540
543
  Edit.prototype.updateIndex = function (data, rows, records) {
@@ -610,8 +613,8 @@ var Edit = /** @class */ (function () {
610
613
  }
611
614
  }
612
615
  var rows = this.parent.grid.getDataRows();
613
- var firstAriaIndex = rows.length ? +rows[0].getAttribute('aria-rowindex') : 0;
614
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') : 0;
616
+ var firstAriaIndex = rows.length ? +rows[0].getAttribute('data-rowindex') : 0;
617
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
615
618
  var withinRange = this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
616
619
  var isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
617
620
  if (this.parent.editSettings.mode !== 'Dialog') {
@@ -681,20 +684,27 @@ var Edit = /** @class */ (function () {
681
684
  focussedElement.focus();
682
685
  }
683
686
  }
684
- if (this.parent.editSettings.mode === 'Batch' && !isNullOrUndefined(this.addRowIndex) && this.addRowIndex !== -1) {
687
+ if (this.parent.editSettings.mode === 'Batch' && !isNullOrUndefined(this.addRowIndex) && this.addRowIndex !== -1 && this['isAddedRowByMethod'] && !this.isAddedRowByContextMenu) {
685
688
  index = this.batchEditModule.getAddRowIndex();
686
689
  this.selectedIndex = this.batchEditModule.getSelectedIndex();
687
- if (this.parent.editModule['isAddedRowByMethod']) {
688
- var args = {
689
- action: 'add',
690
- data: this.parent.getBatchChanges()['addedRecords'][0],
691
- index: index,
692
- seletedRow: 0
693
- };
694
- this.parent.editModule.beginAddEdit(args);
695
- this.parent.editModule.batchEditModule['batchAddRowRecord'].push(this.parent.editModule.batchEditModule['addRowRecord']);
696
- this.parent.editModule.batchEditModule['batchAddedRecords'].push(args['data']);
690
+ var batchAddedRecords = this.parent.getBatchChanges()['addedRecords'];
691
+ var newlyAddedRecord = void 0;
692
+ if (batchAddedRecords.length) {
693
+ for (var i = 0; i < batchAddedRecords.length; i++) {
694
+ if (isNullOrUndefined(batchAddedRecords[i].uniqueID)) {
695
+ newlyAddedRecord = batchAddedRecords[i];
696
+ }
697
+ }
697
698
  }
699
+ var args = {
700
+ action: 'add',
701
+ data: newlyAddedRecord,
702
+ index: index,
703
+ seletedRow: 0
704
+ };
705
+ this.beginAddEdit(args);
706
+ this.batchEditModule['batchAddRowRecord'].push(this.batchEditModule['addRowRecord']);
707
+ this.batchEditModule['batchAddedRecords'].push(args['data']);
698
708
  }
699
709
  };
700
710
  // private beforeDataBound(args: BeforeDataBoundArgs): void {
@@ -761,7 +771,7 @@ var Edit = /** @class */ (function () {
761
771
  this.selectedIndex = this.parent.grid.selectedRowIndex;
762
772
  }
763
773
  if (this.parent.enableVirtualization) {
764
- var selector = '.e-row[aria-rowindex="' + this.selectedIndex + '"]';
774
+ var selector = '.e-row[data-rowindex="' + this.selectedIndex + '"]';
765
775
  var row = void 0;
766
776
  if (this.selectedIndex > -1 && this.parent.editSettings.newRowPosition !== 'Top' &&
767
777
  this.parent.editSettings.newRowPosition !== 'Bottom') {
@@ -771,7 +781,7 @@ var Edit = /** @class */ (function () {
771
781
  }
772
782
  else {
773
783
  if (this.prevAriaRowIndex && this.prevAriaRowIndex !== '-1') {
774
- selector = '.e-row[aria-rowindex="' + this.prevAriaRowIndex + '"]';
784
+ selector = '.e-row[data-rowindex="' + this.prevAriaRowIndex + '"]';
775
785
  row = this.parent.getContent().querySelector(selector);
776
786
  this.addRowIndex = row ? row.rowIndex : 0;
777
787
  }
@@ -782,14 +792,19 @@ var Edit = /** @class */ (function () {
782
792
  }
783
793
  else {
784
794
  if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
785
- this.addRowIndex = args.index;
795
+ if (args.index !== 0) {
796
+ this.addRowIndex = args.index;
797
+ }
798
+ else {
799
+ this.addRowIndex = this.parent.grid.selectedRowIndex;
800
+ }
786
801
  }
787
802
  else {
788
803
  this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
789
804
  }
790
805
  }
791
806
  if (this.isAddedRowByMethod && (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
792
- this.addRowRecord = this.parent.flatData[args.index];
807
+ this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
793
808
  }
794
809
  else {
795
810
  this.addRowRecord = this.parent.getSelectedRecords()[0];
@@ -825,10 +840,16 @@ var Edit = /** @class */ (function () {
825
840
  var key = this.parent.grid.getPrimaryKeyFieldNames()[0];
826
841
  var position = null;
827
842
  value.taskData = isNullOrUndefined(value.taskData) ? extend({}, args.data) : value.taskData;
828
- var currentData = this.parent.grid.getCurrentViewRecords();
843
+ var currentData = void 0;
844
+ if (this.parent.editSettings.mode === 'Batch' && this['isAddedRowByMethod'] && !isNullOrUndefined(this.addRowIndex)) {
845
+ currentData = this.batchEditModule['batchRecords'];
846
+ }
847
+ else {
848
+ currentData = this.parent.grid.getCurrentViewRecords();
849
+ }
829
850
  if (this.parent.enableVirtualization && args.index !== 0) {
830
851
  this.addRowIndex = this.parent.grid.getCurrentViewRecords().indexOf(this.addRowRecord);
831
- this.selectedIndex = parseInt(this.parent.getRows()[this.addRowIndex].getAttribute('aria-rowindex'), 10);
852
+ this.selectedIndex = parseInt(this.parent.getRows()[this.addRowIndex].getAttribute('data-rowindex'), 10);
832
853
  }
833
854
  var index = this.addRowIndex;
834
855
  value.uniqueID = getUid(this.parent.element.id + '_data_');
@@ -841,7 +862,7 @@ var Edit = /** @class */ (function () {
841
862
  var isVirtualization = this.parent.enableVirtualization && this.addRowIndex > -1 && this.prevAriaRowIndex !== '-1';
842
863
  var rows = this.parent.getRows();
843
864
  var firstAriaIndex = rows.length ? currentData.indexOf(currentData[0]) : 0;
844
- var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('aria-rowindex') : 0;
865
+ var lastAriaIndex = rows.length ? +rows[rows.length - 1].getAttribute('data-rowindex') : 0;
845
866
  var withinRange = this.selectedIndex >= firstAriaIndex && this.selectedIndex <= lastAriaIndex;
846
867
  if (currentData.length) {
847
868
  idMapping = currentData[this.addRowIndex][this.parent.idMapping];
@@ -137,6 +137,9 @@ var InfiniteScroll = /** @class */ (function () {
137
137
  });
138
138
  var actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
139
139
  var actions = getValue('actions', this.parent.grid.infiniteScrollModule);
140
+ if (this.parent.grid.infiniteScrollModule['isInitialRender'] && !this.parent.initialRender) {
141
+ this.parent.grid.pageSettings.currentPage = 1;
142
+ }
140
143
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
141
144
  var initialRender = initial ? true : this.parent.initialRender ? true : false;
142
145
  this.visualData = visualData;
@@ -151,8 +154,8 @@ var InfiniteScroll = /** @class */ (function () {
151
154
  this.parent.infiniteScrollSettings.initialBlocks = this.parent.infiniteScrollSettings.maxBlocks;
152
155
  }
153
156
  var size = initialRender ?
154
- this.parent.pageSettings.pageSize * this.parent.infiniteScrollSettings.initialBlocks :
155
- this.parent.pageSettings.pageSize;
157
+ this.parent.grid.pageSettings.pageSize * this.parent.infiniteScrollSettings.initialBlocks :
158
+ this.parent.grid.pageSettings.pageSize;
156
159
  var current = this.parent.grid.pageSettings.currentPage;
157
160
  if (!isNullOrUndefined(actionArgs)) {
158
161
  var lastIndex = getValue('lastIndex', this.parent.grid.infiniteScrollModule);
@@ -170,7 +173,7 @@ var InfiniteScroll = /** @class */ (function () {
170
173
  else {
171
174
  if ((pageingDetails.actionArgs['action'] === 'expand' || pageingDetails.actionArgs['action'] === 'collapse') && this.parent.grid.pageSettings.currentPage !== 1) {
172
175
  current = 1;
173
- size = this.parent.pageSettings.pageSize * this.parent.grid.pageSettings.currentPage;
176
+ size = this.parent.grid.pageSettings.pageSize * this.parent.grid.pageSettings.currentPage;
174
177
  }
175
178
  query = query.page(current, size);
176
179
  }
@@ -190,7 +190,7 @@ var RowDD = /** @class */ (function () {
190
190
  dropIndex = this.selectedRow.rowIndex - 1;
191
191
  }
192
192
  if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
193
- dropIndex = parseInt(this.selectedRow.getAttribute('aria-rowindex'), 10) - 1;
193
+ dropIndex = parseInt(this.selectedRow.getAttribute('data-rowindex'), 10) - 1;
194
194
  }
195
195
  tObj[action] = 'indenting';
196
196
  tObj[droppedIndex] = dropIndex;
@@ -209,7 +209,7 @@ var RowDD = /** @class */ (function () {
209
209
  }
210
210
  }
211
211
  if (this.parent.enableVirtualization && this.parent.allowRowDragAndDrop && this.selectedRecord) {
212
- dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('aria-rowindex'), 10);
212
+ dropIndex = parseInt(this.parent.getRows()[dropIndex].getAttribute('data-rowindex'), 10);
213
213
  }
214
214
  tObj[action] = 'outdenting';
215
215
  tObj[droppedIndex] = dropIndex;
@@ -229,7 +229,7 @@ var RowDD = /** @class */ (function () {
229
229
  if (!actionArgs.cancel) {
230
230
  if (actionArgs.action === 'indenting') {
231
231
  if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
232
- _this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10)], dropIndex, 'child');
232
+ _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'child');
233
233
  }
234
234
  else {
235
235
  _this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'child');
@@ -237,7 +237,7 @@ var RowDD = /** @class */ (function () {
237
237
  }
238
238
  else if (actionArgs.action === 'outdenting') {
239
239
  if (_this.parent.enableVirtualization && _this.parent.allowRowDragAndDrop) {
240
- _this.reorderRows([parseInt(_this.selectedRow.getAttribute('aria-rowindex'), 10)], dropIndex, 'below');
240
+ _this.reorderRows([parseInt(_this.selectedRow.getAttribute('data-rowindex'), 10)], dropIndex, 'below');
241
241
  }
242
242
  else {
243
243
  _this.reorderRows([_this.selectedRow.rowIndex], dropIndex, 'below');
@@ -863,7 +863,7 @@ var RowDD = /** @class */ (function () {
863
863
  }
864
864
  };
865
865
  RowDD.prototype.getTargetIdx = function (targetRow) {
866
- return targetRow ? parseInt(targetRow.getAttribute('aria-rowindex'), 10) : 0;
866
+ return targetRow ? parseInt(targetRow.getAttribute('data-rowindex'), 10) : 0;
867
867
  };
868
868
  RowDD.prototype.getParentData = function (record, data) {
869
869
  var parentItem = record.parentItem;
@@ -245,7 +245,12 @@ var Selection = /** @class */ (function () {
245
245
  if (indeter > 0 || (checkChildRecords > 0 && checkChildRecords !== length)) {
246
246
  record.checkboxState = 'indeterminate';
247
247
  }
248
- else if (checkChildRecords === 0 && indeter === 0) {
248
+ else if (checkChildRecords === 0 && (!record.hasFilteredChildRecords || isNullOrUndefined(record.hasFilteredChildRecords)) && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
249
+ (this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check') {
250
+ record.checkboxState = 'check';
251
+ }
252
+ else if ((checkChildRecords === 0 && indeter === 0) || (checkChildRecords === 0 && record.hasFilteredChildRecords && !isNullOrUndefined(this.parent['dataResults']['actionArgs']) &&
253
+ (this.parent['dataResults']['actionArgs'].requestType === 'searching' || this.parent['dataResults']['actionArgs'].requestType === 'filtering') && record.checkboxState === 'check')) {
249
254
  record.checkboxState = 'uncheck';
250
255
  }
251
256
  else {
@@ -435,7 +440,7 @@ var Selection = /** @class */ (function () {
435
440
  childData = (!isNullOrUndefined(this.parent.filterModule) && this.parent.filterModule.filteredResult.length > 0) ?
436
441
  this.parent.getCurrentViewRecords() : this.parent.flatData;
437
442
  childData.forEach(function (record) {
438
- if (_this.parent.enableVirtualization) {
443
+ if (_this.parent.enableVirtualization && record.childRecords.length > 0) {
439
444
  if (record.hasChildRecords) {
440
445
  _this.updateParentSelection(record);
441
446
  }
@@ -128,3 +128,5 @@ export declare const rowdraging: string;
128
128
  export declare const rowDropped: string;
129
129
  /** @hidden */
130
130
  export declare const autoCol: string;
131
+ /** @hidden */
132
+ export declare const rowDeselecting: string;
@@ -128,3 +128,5 @@ export var rowdraging = 'row-draging';
128
128
  export var rowDropped = 'row-dropped';
129
129
  /** @hidden */
130
130
  export var autoCol = 'auto-col';
131
+ /** @hidden */
132
+ export var rowDeselecting = 'rowDeselecting';
@@ -377,8 +377,8 @@ var DataManipulation = /** @class */ (function () {
377
377
  if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
378
378
  currentData.index = this.storedIndex;
379
379
  }
380
- if (!isNullOrUndefined(currentData[this.parent.childMapping]) ||
381
- (currentData[this.parent.hasChildMapping] && isCountRequired(this.parent))) {
380
+ if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
381
+ ((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent) && this.parent.initialRender)) {
382
382
  currentData.hasChildRecords = true;
383
383
  if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
384
384
  && isNullOrUndefined(currentData[this.parent.childMapping])) {
@@ -1222,6 +1222,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1222
1222
  private convertTreeData;
1223
1223
  private bindGridProperties;
1224
1224
  private triggerEvents;
1225
+ private IsExpandCollapseClicked;
1225
1226
  private bindGridEvents;
1226
1227
  private lastRowBorder;
1227
1228
  private isPixelHeight;
@@ -743,16 +743,23 @@ var TreeGrid = /** @class */ (function (_super) {
743
743
  TreeGrid.prototype.triggerEvents = function (args) {
744
744
  this.trigger(getObject('name', args), args);
745
745
  };
746
+ TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
747
+ if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
748
+ || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))) {
749
+ args.cancel = true;
750
+ return;
751
+ }
752
+ };
746
753
  TreeGrid.prototype.bindGridEvents = function () {
747
754
  var _this = this;
748
755
  this.grid.rowSelecting = function (args) {
749
- if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
750
- || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))) {
751
- args.cancel = true;
752
- return;
753
- }
756
+ _this.IsExpandCollapseClicked(args);
754
757
  _this.trigger(events.rowSelecting, args);
755
758
  };
759
+ this.grid.rowDeselecting = function (args) {
760
+ _this.IsExpandCollapseClicked(args);
761
+ _this.trigger(events.rowDeselecting, args);
762
+ };
756
763
  this.grid.rowSelected = function (args) {
757
764
  if (_this.enableVirtualization && args.isHeaderCheckboxClicked &&
758
765
  _this.grid.currentViewData.length !== _this.grid.selectionModule.selectedRowIndexes.length) {
@@ -2537,7 +2544,7 @@ var TreeGrid = /** @class */ (function (_super) {
2537
2544
  }
2538
2545
  else if (isNullOrUndefined(record)) {
2539
2546
  if (this.detailTemplate) {
2540
- record = this.grid.getCurrentViewRecords()[row.getAttribute('aria-rowindex')];
2547
+ record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
2541
2548
  }
2542
2549
  else {
2543
2550
  record = this.grid.getCurrentViewRecords()[row.rowIndex];
@@ -2815,7 +2822,7 @@ var TreeGrid = /** @class */ (function (_super) {
2815
2822
  row = gridRows[rowIndex];
2816
2823
  }
2817
2824
  else {
2818
- rowIndex = +row.getAttribute('aria-rowindex');
2825
+ rowIndex = +row.getAttribute('data-rowindex');
2819
2826
  }
2820
2827
  if (!isNullOrUndefined(row)) {
2821
2828
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
@@ -2969,7 +2976,7 @@ var TreeGrid = /** @class */ (function (_super) {
2969
2976
  var args = { data: record, row: row };
2970
2977
  var rows = [];
2971
2978
  rows = gridRows.filter(function (r) {
2972
- return r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1));
2979
+ return ((r.querySelector('.e-gridrowindex' + record.index + 'level' + (record.level + 1))) || (r.querySelector('.e-gridrowindex' + record.index + 'level0' + '.e-summarycell')));
2973
2980
  });
2974
2981
  if (action === 'expand') {
2975
2982
  this.notify(events.remoteExpand, { record: record, rows: rows, parentRow: row });
@@ -47,7 +47,7 @@ var Render = /** @class */ (function () {
47
47
  var parentrec = this.parent.getCurrentViewRecords().filter(function (rec) {
48
48
  return getValue(proxy_1.idMapping, rec) === getValue(proxy_1.parentIdMapping, data);
49
49
  });
50
- if (parentrec.length > 0) {
50
+ if (parentrec.length > 0 && !parentrec[0].isSummaryRow) {
51
51
  var display = parentrec[0].expanded ? 'table-row' : 'none';
52
52
  args.row.setAttribute('style', 'display: ' + display + ';');
53
53
  }
@@ -227,7 +227,7 @@ var Render = /** @class */ (function () {
227
227
  var templateFn = 'templateFn';
228
228
  var colindex = args.column.index;
229
229
  if (isNullOrUndefined(treeColumn.field)) {
230
- args.cell.setAttribute('aria-colindex', colindex + '');
230
+ args.cell.setAttribute('data-colindex', colindex + '');
231
231
  }
232
232
  if (treeColumn.field === args.column.field && !isNullOrUndefined(treeColumn.template)) {
233
233
  args.column.template = treeColumn.template;
@@ -11,7 +11,7 @@ export declare class VirtualTreeContentRenderer extends VirtualContentRenderer {
11
11
  private maxiPage;
12
12
  private rowPosition;
13
13
  private addRowIndex;
14
- private ariaRowIndex;
14
+ private dataRowIndex;
15
15
  private recordAdded;
16
16
  /** @hidden */
17
17
  startIndex: number;