@syncfusion/ej2-treegrid 26.2.14 → 27.1.48

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.
Files changed (139) hide show
  1. package/dist/ej2-treegrid.min.js +2 -2
  2. package/dist/ej2-treegrid.umd.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-treegrid.es2015.js +83 -118
  5. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  6. package/dist/es6/ej2-treegrid.es5.js +83 -118
  7. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  8. package/dist/global/ej2-treegrid.min.js +2 -2
  9. package/dist/global/ej2-treegrid.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +11 -10
  12. package/src/treegrid/actions/batch-edit.js +3 -0
  13. package/src/treegrid/actions/edit.js +4 -3
  14. package/src/treegrid/actions/excel-export.js +3 -1
  15. package/src/treegrid/actions/virtual-scroll.d.ts +2 -0
  16. package/src/treegrid/actions/virtual-scroll.js +7 -1
  17. package/src/treegrid/base/data.js +27 -28
  18. package/src/treegrid/base/treegrid-model.d.ts +5 -2
  19. package/src/treegrid/base/treegrid.d.ts +7 -2
  20. package/src/treegrid/base/treegrid.js +38 -84
  21. package/src/treegrid/renderer/render.js +1 -1
  22. package/styles/bootstrap-dark-lite.css +427 -0
  23. package/styles/bootstrap-dark-lite.scss +18 -0
  24. package/styles/bootstrap-dark.css +24 -71
  25. package/styles/bootstrap-dark.scss +1 -0
  26. package/styles/bootstrap-lite.css +430 -0
  27. package/styles/bootstrap-lite.scss +18 -0
  28. package/styles/bootstrap.css +27 -74
  29. package/styles/bootstrap.scss +1 -0
  30. package/styles/bootstrap4-lite.css +463 -0
  31. package/styles/bootstrap4-lite.scss +18 -0
  32. package/styles/bootstrap4.css +24 -89
  33. package/styles/bootstrap4.scss +1 -0
  34. package/styles/bootstrap5-dark-lite.css +466 -0
  35. package/styles/bootstrap5-dark-lite.scss +18 -0
  36. package/styles/bootstrap5-dark.css +24 -75
  37. package/styles/bootstrap5-dark.scss +1 -0
  38. package/styles/bootstrap5-lite.css +466 -0
  39. package/styles/bootstrap5-lite.scss +18 -0
  40. package/styles/bootstrap5.3-lite.css +470 -0
  41. package/styles/bootstrap5.3-lite.scss +18 -0
  42. package/styles/bootstrap5.3.css +490 -0
  43. package/styles/bootstrap5.3.scss +19 -0
  44. package/styles/bootstrap5.css +24 -75
  45. package/styles/bootstrap5.scss +1 -0
  46. package/styles/fabric-dark-lite.css +406 -0
  47. package/styles/fabric-dark-lite.scss +18 -0
  48. package/styles/fabric-dark.css +27 -73
  49. package/styles/fabric-dark.scss +1 -0
  50. package/styles/fabric-lite.css +406 -0
  51. package/styles/fabric-lite.scss +18 -0
  52. package/styles/fabric.css +27 -66
  53. package/styles/fabric.scss +1 -0
  54. package/styles/fluent-dark-lite.css +469 -0
  55. package/styles/fluent-dark-lite.scss +18 -0
  56. package/styles/fluent-dark.css +31 -69
  57. package/styles/fluent-dark.scss +1 -0
  58. package/styles/fluent-lite.css +469 -0
  59. package/styles/fluent-lite.scss +18 -0
  60. package/styles/fluent.css +31 -69
  61. package/styles/fluent.scss +1 -0
  62. package/styles/fluent2-lite.css +657 -0
  63. package/styles/fluent2-lite.scss +18 -0
  64. package/styles/fluent2.css +50 -62
  65. package/styles/fluent2.scss +1 -0
  66. package/styles/highcontrast-light-lite.css +412 -0
  67. package/styles/highcontrast-light-lite.scss +18 -0
  68. package/styles/highcontrast-light.css +24 -58
  69. package/styles/highcontrast-light.scss +1 -0
  70. package/styles/highcontrast-lite.css +419 -0
  71. package/styles/highcontrast-lite.scss +18 -0
  72. package/styles/highcontrast.css +31 -65
  73. package/styles/highcontrast.scss +1 -0
  74. package/styles/material-dark-lite.css +488 -0
  75. package/styles/material-dark-lite.scss +18 -0
  76. package/styles/material-dark.css +24 -55
  77. package/styles/material-dark.scss +1 -0
  78. package/styles/material-lite.css +512 -0
  79. package/styles/material-lite.scss +18 -0
  80. package/styles/material.css +24 -76
  81. package/styles/material.scss +1 -0
  82. package/styles/material3-dark-lite.css +499 -0
  83. package/styles/material3-dark-lite.scss +18 -0
  84. package/styles/material3-dark.css +24 -80
  85. package/styles/material3-dark.scss +1 -0
  86. package/styles/material3-lite.css +501 -0
  87. package/styles/material3-lite.scss +18 -0
  88. package/styles/material3.css +24 -80
  89. package/styles/material3.scss +1 -0
  90. package/styles/tailwind-dark-lite.css +439 -0
  91. package/styles/tailwind-dark-lite.scss +18 -0
  92. package/styles/tailwind-dark.css +24 -56
  93. package/styles/tailwind-dark.scss +1 -0
  94. package/styles/tailwind-lite.css +439 -0
  95. package/styles/tailwind-lite.scss +18 -0
  96. package/styles/tailwind.css +24 -56
  97. package/styles/tailwind.scss +1 -0
  98. package/styles/treegrid/_bigger.scss +62 -0
  99. package/styles/treegrid/_bootstrap5.3-definition.scss +5 -5
  100. package/styles/treegrid/_fluent2-definition.scss +3 -3
  101. package/styles/treegrid/_layout.scss +19 -52
  102. package/styles/treegrid/bootstrap-dark.css +24 -71
  103. package/styles/treegrid/bootstrap-dark.scss +1 -0
  104. package/styles/treegrid/bootstrap.css +27 -74
  105. package/styles/treegrid/bootstrap.scss +1 -0
  106. package/styles/treegrid/bootstrap4.css +24 -89
  107. package/styles/treegrid/bootstrap4.scss +1 -0
  108. package/styles/treegrid/bootstrap5-dark.css +24 -75
  109. package/styles/treegrid/bootstrap5-dark.scss +1 -0
  110. package/styles/treegrid/bootstrap5.3.css +490 -0
  111. package/styles/treegrid/bootstrap5.3.scss +19 -0
  112. package/styles/treegrid/bootstrap5.css +24 -75
  113. package/styles/treegrid/bootstrap5.scss +1 -0
  114. package/styles/treegrid/fabric-dark.css +27 -73
  115. package/styles/treegrid/fabric-dark.scss +1 -0
  116. package/styles/treegrid/fabric.css +27 -66
  117. package/styles/treegrid/fabric.scss +1 -0
  118. package/styles/treegrid/fluent-dark.css +31 -69
  119. package/styles/treegrid/fluent-dark.scss +1 -0
  120. package/styles/treegrid/fluent.css +31 -69
  121. package/styles/treegrid/fluent.scss +1 -0
  122. package/styles/treegrid/fluent2.css +50 -62
  123. package/styles/treegrid/fluent2.scss +1 -0
  124. package/styles/treegrid/highcontrast-light.css +24 -58
  125. package/styles/treegrid/highcontrast-light.scss +1 -0
  126. package/styles/treegrid/highcontrast.css +31 -65
  127. package/styles/treegrid/highcontrast.scss +1 -0
  128. package/styles/treegrid/material-dark.css +24 -55
  129. package/styles/treegrid/material-dark.scss +1 -0
  130. package/styles/treegrid/material.css +24 -76
  131. package/styles/treegrid/material.scss +1 -0
  132. package/styles/treegrid/material3-dark.css +24 -80
  133. package/styles/treegrid/material3-dark.scss +1 -0
  134. package/styles/treegrid/material3.css +24 -80
  135. package/styles/treegrid/material3.scss +1 -0
  136. package/styles/treegrid/tailwind-dark.css +24 -56
  137. package/styles/treegrid/tailwind-dark.scss +1 -0
  138. package/styles/treegrid/tailwind.css +24 -56
  139. package/styles/treegrid/tailwind.scss +1 -0
@@ -72,6 +72,7 @@ var TreeGrid = /** @class */ (function (_super) {
72
72
  _this.deletedRecords = 'deletedRecords';
73
73
  _this.addedRecords = 'addedRecords';
74
74
  _this.indentOutdentAction = 'indentOutdentAction';
75
+ _this.isFromChartSide = false;
75
76
  _this.modifiedRecords = [];
76
77
  _this.stackedHeader = false;
77
78
  _this.objectEqualityChecker = function (old, current) {
@@ -302,10 +303,6 @@ var TreeGrid = /** @class */ (function (_super) {
302
303
  * @returns {void}
303
304
  */
304
305
  TreeGrid.prototype.sortByColumn = function (columnName, direction, isMultiSort) {
305
- if (isNullOrUndefined(columnName) && isNullOrUndefined(direction)) {
306
- var error = 'The provided value for the columnName and direction is undefined. Please ensure the columnName and direction contains string.';
307
- this.trigger(events.actionFailure, { error: error });
308
- }
309
306
  if (this.sortModule) {
310
307
  this.sortModule.sortColumn(columnName, direction, isMultiSort);
311
308
  }
@@ -366,10 +363,6 @@ var TreeGrid = /** @class */ (function (_super) {
366
363
  * @returns {void}
367
364
  */
368
365
  TreeGrid.prototype.reorderColumns = function (fromFName, toFName) {
369
- if (isNullOrUndefined(fromFName) && isNullOrUndefined(toFName)) {
370
- var error = 'The provided value for the fromFName and toFName is undefined. Please ensure the fromFName and toFName contains string.';
371
- this.trigger(events.actionFailure, { error: error });
372
- }
373
366
  this.grid.reorderColumns(fromFName, toFName);
374
367
  };
375
368
  TreeGrid.prototype.TreeGridLocale = function () {
@@ -449,8 +442,10 @@ var TreeGrid = /** @class */ (function (_super) {
449
442
  if (summaryElement !== null) {
450
443
  var cellIndex_1 = target.cellIndex;
451
444
  var row_1 = summaryElement.children[parseInt(cellIndex_1.toString(), 10)];
452
- addClass([row_1], 'e-focused');
453
- addClass([row_1], 'e-focus');
445
+ if (!isNullOrUndefined(row_1) && !this.grid.isEdit) {
446
+ addClass([row_1], 'e-focused');
447
+ addClass([row_1], 'e-focus');
448
+ }
454
449
  }
455
450
  else {
456
451
  this.clearSelection();
@@ -477,8 +472,10 @@ var TreeGrid = /** @class */ (function (_super) {
477
472
  var cellIndex_2 = target.cellIndex;
478
473
  if (!isNullOrUndefined(cellIndex_2)) {
479
474
  var row_2 = summaryElement.children[parseInt(cellIndex_2.toString(), 10)];
480
- addClass([row_2], 'e-focused');
481
- addClass([row_2], 'e-focus');
475
+ if (!isNullOrUndefined(row_2) && !this.grid.isEdit) {
476
+ addClass([row_2], 'e-focused');
477
+ addClass([row_2], 'e-focus');
478
+ }
482
479
  }
483
480
  }
484
481
  else {
@@ -608,7 +605,7 @@ var TreeGrid = /** @class */ (function (_super) {
608
605
  name: 'Aggregate'
609
606
  });
610
607
  }
611
- if (this.allowResizing) {
608
+ if (this.resizeCheck()) {
612
609
  modules.push({
613
610
  member: 'resize', args: [this],
614
611
  name: 'Resize'
@@ -657,6 +654,13 @@ var TreeGrid = /** @class */ (function (_super) {
657
654
  this.extendRequiredModules(modules);
658
655
  return modules;
659
656
  };
657
+ TreeGrid.prototype.resizeCheck = function () {
658
+ var columnMenu = this.showColumnMenu && (!this.columnMenuItems || this.columnMenuItems
659
+ .filter(function (c) { return c === 'AutoFit' || c === 'AutoFitAll'; }).length) ? true : false;
660
+ var contextMenu = this.contextMenuItems && this.contextMenuItems
661
+ .filter(function (c) { return c === 'AutoFit' || c === 'AutoFitAll'; }).length ? true : false;
662
+ return this.allowResizing || columnMenu || contextMenu;
663
+ };
660
664
  TreeGrid.prototype.extendRequiredModules = function (modules) {
661
665
  var IsRowDDInjected = this.injectedModules.filter(function (e) {
662
666
  return e.prototype.getModuleName() === 'rowDragAndDrop';
@@ -859,9 +863,6 @@ var TreeGrid = /** @class */ (function (_super) {
859
863
  if (this.enableVirtualization && !isNullOrUndefined(this.detailTemplate)) {
860
864
  failureCases.push('Virtual scrolling is not compatible with the detail template');
861
865
  }
862
- if (this.stackedHeader && !isNullOrUndefined(this.detailTemplate)) {
863
- failureCases.push('Virtual scrolling is not compatible with the detail template');
864
- }
865
866
  if ((this.frozenColumns > 0 || this.columnModel.filter(function (col) { return col.isFrozen; }) || this.frozenRows > 0)
866
867
  && (!isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.rowTemplate))) {
867
868
  failureCases.push('Frozen rows and columns are not supported with the Detail template and row template.');
@@ -1035,7 +1036,7 @@ var TreeGrid = /** @class */ (function (_super) {
1035
1036
  this.trigger(getObject('name', args), args);
1036
1037
  };
1037
1038
  TreeGrid.prototype.IsExpandCollapseClicked = function (args) {
1038
- if (!isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
1039
+ if (!this.isFromChartSide && !isNullOrUndefined(args.target) && (args.target.classList.contains('e-treegridexpand')
1039
1040
  || args.target.classList.contains('e-treegridcollapse') || args.target.classList.contains('e-summarycell'))
1040
1041
  && !this.selectionSettings.checkboxOnly) {
1041
1042
  if ((!isNullOrUndefined(args.data) && args.data['hasChildRecords']) || (args.rowIndex !== -1 && isNullOrUndefined(args.data))) {
@@ -1058,9 +1059,13 @@ var TreeGrid = /** @class */ (function (_super) {
1058
1059
  if (_this.pageSettings.pageSizeMode === 'Root') {
1059
1060
  _this.grid.selectionModule['totalRecordsCount'] = _this.grid.currentViewData.length;
1060
1061
  }
1061
- if (_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex) {
1062
+ if (_this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && !_this.enablePersistence) {
1062
1063
  args.cancel = true;
1063
1064
  }
1065
+ if (!isNullOrUndefined(_this.selectionSettings) && !_this.selectionSettings.persistSelection &&
1066
+ _this.enableVirtualization && args.rowIndex === _this.selectedRowIndex && _this.isGantt) {
1067
+ args.cancel = false;
1068
+ }
1064
1069
  _this.trigger(events.rowSelecting, args);
1065
1070
  };
1066
1071
  this.grid.rowDeselecting = function (args) {
@@ -2183,7 +2188,7 @@ var TreeGrid = /** @class */ (function (_super) {
2183
2188
  }
2184
2189
  if (((target.classList.contains('e-flmenu-cancelbtn') || target.classList.contains('e-flmenu-okbtn')
2185
2190
  || target.classList.contains('e-content') || target.classList.contains('e-rowcell'))
2186
- && !isNullOrUndefined(this.filterModule) && this.isReact)) {
2191
+ && !isNullOrUndefined(this.grid.filterModule) && this.isReact)) {
2187
2192
  if (!isNullOrUndefined(this.grid.filterModule['column'])) {
2188
2193
  if (this.grid.filterModule['column'].filterTemplate) {
2189
2194
  var elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
@@ -2363,10 +2368,6 @@ var TreeGrid = /** @class */ (function (_super) {
2363
2368
  * @returns {void}
2364
2369
  */
2365
2370
  TreeGrid.prototype.deleteRow = function (tr) {
2366
- if (isNullOrUndefined(tr)) {
2367
- var error = 'The provided value for the tr is undefined. Please ensure the tr contains HTMLTableRowElement.';
2368
- this.trigger(events.actionFailure, { error: error });
2369
- }
2370
2371
  if (this.grid.editModule) {
2371
2372
  this.grid.editModule.deleteRow(tr);
2372
2373
  }
@@ -2392,10 +2393,6 @@ var TreeGrid = /** @class */ (function (_super) {
2392
2393
  this.grid.setCellValue(key, field, value);
2393
2394
  var rowIndex = this.grid.getRowIndexByPrimaryKey(key);
2394
2395
  var record = this.getCurrentViewRecords()[parseInt(rowIndex.toString(), 10)];
2395
- if (isNullOrUndefined(record)) {
2396
- var error = 'The provided value for the record is undefined. Please ensure the record contains ITreeData.';
2397
- this.trigger(events.actionFailure, { error: error });
2398
- }
2399
2396
  editAction({ value: record, action: 'edit' }, this, this.isSelfReference, record.index, this.grid.selectedRowIndex, field);
2400
2397
  };
2401
2398
  /**
@@ -2447,10 +2444,6 @@ var TreeGrid = /** @class */ (function (_super) {
2447
2444
  * @returns {void}
2448
2445
  */
2449
2446
  TreeGrid.prototype.goToPage = function (pageNo) {
2450
- if (isNullOrUndefined(pageNo)) {
2451
- var error = 'The provided value for the pageNo is undefined. Please ensure the pageNo contains number.';
2452
- this.trigger(events.actionFailure, { error: error });
2453
- }
2454
2447
  if (this.grid.pagerModule) {
2455
2448
  this.grid.pagerModule.goToPage(pageNo);
2456
2449
  }
@@ -2552,10 +2545,6 @@ var TreeGrid = /** @class */ (function (_super) {
2552
2545
  * @returns {void}
2553
2546
  */
2554
2547
  TreeGrid.prototype.hideColumns = function (keys, hideBy) {
2555
- if (isNullOrUndefined(keys)) {
2556
- var error = 'The provided value for the keys is undefined. Please ensure the keys contains string.';
2557
- this.trigger(events.actionFailure, { error: error });
2558
- }
2559
2548
  this.grid.hideColumns(keys, hideBy);
2560
2549
  this.updateColumnModel();
2561
2550
  };
@@ -2653,6 +2642,10 @@ var TreeGrid = /** @class */ (function (_super) {
2653
2642
  if (this.grid.columns.length !== this.columnModel.length) {
2654
2643
  this.stackedHeader = true;
2655
2644
  }
2645
+ if (this.stackedHeader && !isNullOrUndefined(this.detailTemplate)) {
2646
+ var error = 'Stacked header is not compatible with the detail template';
2647
+ this.trigger(events.actionFailure, { error: error });
2648
+ }
2656
2649
  if (this.stackedHeader && this.allowResizing && !isNullOrUndefined(this.columns)) {
2657
2650
  this.updateColumnsWidth(this.columns);
2658
2651
  }
@@ -2974,10 +2967,6 @@ var TreeGrid = /** @class */ (function (_super) {
2974
2967
  TreeGrid.prototype.expandRow = function (row, record, key, level) {
2975
2968
  var _this = this;
2976
2969
  this.isCollapseAll = false;
2977
- if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key) && isNullOrUndefined(level)) {
2978
- var error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
2979
- this.trigger(events.actionFailure, { error: error });
2980
- }
2981
2970
  var parentRec = this.parentData;
2982
2971
  if (!this.enableVirtualization) {
2983
2972
  parentRec = this.flatData.filter(function (e) {
@@ -3066,7 +3055,7 @@ var TreeGrid = /** @class */ (function (_super) {
3066
3055
  return e.hasChildRecords;
3067
3056
  });
3068
3057
  }
3069
- else if (isNullOrUndefined(record) && !isNullOrUndefined(row)) {
3058
+ else if (isNullOrUndefined(record)) {
3070
3059
  if (this.detailTemplate) {
3071
3060
  record = this.grid.getCurrentViewRecords()[row.getAttribute('data-rowindex')];
3072
3061
  }
@@ -3100,10 +3089,6 @@ var TreeGrid = /** @class */ (function (_super) {
3100
3089
  TreeGrid.prototype.collapseRow = function (row, record, key) {
3101
3090
  var _this = this;
3102
3091
  this.isExpandAll = false;
3103
- if (isNullOrUndefined(row) && isNullOrUndefined(record) && isNullOrUndefined(key)) {
3104
- var error = 'The provided value for the row is undefined. Please ensure the row contains row element.';
3105
- this.trigger(events.actionFailure, { error: error });
3106
- }
3107
3092
  var parentRec = this.parentData;
3108
3093
  if (!this.enableVirtualization) {
3109
3094
  parentRec = this.flatData.filter(function (e) {
@@ -3183,10 +3168,6 @@ var TreeGrid = /** @class */ (function (_super) {
3183
3168
  * @returns {void}
3184
3169
  */
3185
3170
  TreeGrid.prototype.expandAtLevel = function (level) {
3186
- if (isNullOrUndefined(level)) {
3187
- var error = 'The provided value for the level is undefined. Please ensure the level contains number.';
3188
- this.trigger(events.actionFailure, { error: error });
3189
- }
3190
3171
  if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
3191
3172
  var rec = this.grid.dataSource.filter(function (e) {
3192
3173
  if (e.hasChildRecords && e.level === level) {
@@ -3209,10 +3190,6 @@ var TreeGrid = /** @class */ (function (_super) {
3209
3190
  * @returns {void}
3210
3191
  */
3211
3192
  TreeGrid.prototype.expandByKey = function (key) {
3212
- if (isNullOrUndefined(key)) {
3213
- var error = 'The provided value for the key is undefined. Please ensure the key contains number.';
3214
- this.trigger(events.actionFailure, { error: error });
3215
- }
3216
3193
  this.expandCollapseActionByKey(key, 'Expand');
3217
3194
  };
3218
3195
  TreeGrid.prototype.expandAction = function (record, key, level, isPaging) {
@@ -3270,10 +3247,6 @@ var TreeGrid = /** @class */ (function (_super) {
3270
3247
  * @returns {void}
3271
3248
  */
3272
3249
  TreeGrid.prototype.collapseAtLevel = function (level) {
3273
- if (isNullOrUndefined(level)) {
3274
- var error = 'The provided value for the level is undefined. Please ensure the level contains number.';
3275
- this.trigger(events.actionFailure, { error: error });
3276
- }
3277
3250
  if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
3278
3251
  var record = this.grid.dataSource.filter(function (e) {
3279
3252
  if (e.hasChildRecords && e.level === level) {
@@ -3296,10 +3269,6 @@ var TreeGrid = /** @class */ (function (_super) {
3296
3269
  * @returns {void}
3297
3270
  */
3298
3271
  TreeGrid.prototype.collapseByKey = function (key) {
3299
- if (isNullOrUndefined(key)) {
3300
- var error = 'The provided value for the key is undefined. Please ensure the key contains number.';
3301
- this.trigger(events.actionFailure, { error: error });
3302
- }
3303
3272
  this.expandCollapseActionByKey(key, 'Collapse');
3304
3273
  };
3305
3274
  TreeGrid.prototype.expandCollapseActionByKey = function (key, action) {
@@ -3425,14 +3394,11 @@ var TreeGrid = /** @class */ (function (_super) {
3425
3394
  TreeGrid.prototype.expandCollapse = function (action, row, record, isChild) {
3426
3395
  var _this = this;
3427
3396
  var expandingArgs = { row: row, data: record, childData: [], requestType: action };
3428
- var childRecords;
3429
- if (!isNullOrUndefined(record)) {
3430
- childRecords = this.grid.currentViewData.filter(function (e) {
3431
- return e.parentUniqueID === record.uniqueID;
3432
- });
3433
- }
3397
+ var childRecords = this.grid.currentViewData.filter(function (e) {
3398
+ return e.parentUniqueID === record.uniqueID;
3399
+ });
3434
3400
  var targetEle;
3435
- if ((!isRemoteData(this) && action === 'expand' && this.isSelfReference && isCountRequired(this) && !childRecords.length) || (action === 'collapse' || (this.isExpandAll && this.loadChildOnDemand) && !isRemoteData(this) && this.isSelfReference && isCountRequired(this))) {
3401
+ if ((!isRemoteData(this) && action === 'expand' && this.isSelfReference && isCountRequired(this) && !childRecords.length) || (action === 'collapse' || (this.isExpandAll && !this.loadChildOnDemand) && !isRemoteData(this) && this.isSelfReference && isCountRequired(this))) {
3436
3402
  this.updateChildOnDemand(expandingArgs);
3437
3403
  }
3438
3404
  var gridRows = this.getRows();
@@ -3459,7 +3425,7 @@ var TreeGrid = /** @class */ (function (_super) {
3459
3425
  var displayAction = void 0;
3460
3426
  if (action === 'expand') {
3461
3427
  displayAction = 'table-row';
3462
- if (!isChild && !isNullOrUndefined(record)) {
3428
+ if (!isChild) {
3463
3429
  record.expanded = true;
3464
3430
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3465
3431
  }
@@ -3480,7 +3446,7 @@ var TreeGrid = /** @class */ (function (_super) {
3480
3446
  }
3481
3447
  else {
3482
3448
  displayAction = 'none';
3483
- if ((!isChild || isCountRequired(this)) && !isNullOrUndefined(row)) {
3449
+ if (!isChild || isCountRequired(this)) {
3484
3450
  record.expanded = false;
3485
3451
  this.uniqueIDCollection[record.uniqueID].expanded = record.expanded;
3486
3452
  }
@@ -3625,7 +3591,7 @@ var TreeGrid = /** @class */ (function (_super) {
3625
3591
  data_1.push(expandingArgs.childData[parseInt(j.toString(), 10)]);
3626
3592
  }
3627
3593
  }
3628
- if (isCountRequired(_this) && _this.loadChildOnDemand && expandingArgs.requestType === 'expand') {
3594
+ if (isCountRequired(_this) && !_this.loadChildOnDemand && expandingArgs.requestType === 'expand') {
3629
3595
  _this.dataResults['expandRecord'] = {};
3630
3596
  _this.dataResults['expandRecord'] = expandingArgs.data;
3631
3597
  }
@@ -3792,7 +3758,7 @@ var TreeGrid = /** @class */ (function (_super) {
3792
3758
  }
3793
3759
  };
3794
3760
  TreeGrid.prototype.collapseRemoteChild = function (rowDetails, isChild) {
3795
- if (!isNullOrUndefined(isChild) && !isChild && !this.loadChildOnDemand) {
3761
+ if (!isNullOrUndefined(isChild) && !isChild && this.loadChildOnDemand) {
3796
3762
  rowDetails.record.expanded = false;
3797
3763
  }
3798
3764
  var rows = rowDetails.rows;
@@ -3923,10 +3889,6 @@ var TreeGrid = /** @class */ (function (_super) {
3923
3889
  * @returns {void}
3924
3890
  */
3925
3891
  TreeGrid.prototype.filterByColumn = function (fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
3926
- if (isNullOrUndefined(fieldName) && isNullOrUndefined(filterOperator) && isNullOrUndefined(filterValue)) {
3927
- var error = 'The provided value for the fieldName, filterOperator and filterValue are undefined. Please ensure the fieldName, filterOperator and filterValue.';
3928
- this.trigger(events.actionFailure, { error: error });
3929
- }
3930
3892
  this.grid.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
3931
3893
  };
3932
3894
  /**
@@ -3993,10 +3955,6 @@ var TreeGrid = /** @class */ (function (_super) {
3993
3955
  * @returns {void}
3994
3956
  */
3995
3957
  TreeGrid.prototype.paste = function (data, rowIndex, colIndex) {
3996
- if (isNullOrUndefined(data) && isNullOrUndefined(rowIndex) && isNullOrUndefined(colIndex)) {
3997
- var error = 'The provided value for the index is undefined. Please ensure the index contains number.';
3998
- this.trigger(events.actionFailure, { error: error });
3999
- }
4000
3958
  this.clipboardModule.paste(data, rowIndex, colIndex);
4001
3959
  };
4002
3960
  /**
@@ -4265,10 +4223,6 @@ var TreeGrid = /** @class */ (function (_super) {
4265
4223
  * @returns {void}
4266
4224
  */
4267
4225
  TreeGrid.prototype.reorderRows = function (fromIndexes, toIndex, position) {
4268
- if (isNullOrUndefined(fromIndexes) && isNullOrUndefined(toIndex) && isNullOrUndefined(position)) {
4269
- var error = 'The provided value for the fromIndexes, toIndex and position is undefined. Please ensure the fromIndexes and toIndex contains number and position contains string.';
4270
- this.trigger(events.actionFailure, { error: error });
4271
- }
4272
4226
  this.rowDragAndDropModule.reorderRows(fromIndexes, toIndex, position);
4273
4227
  };
4274
4228
  /**
@@ -4348,7 +4302,7 @@ var TreeGrid = /** @class */ (function (_super) {
4348
4302
  Property(false)
4349
4303
  ], TreeGrid.prototype, "allowPaging", void 0);
4350
4304
  __decorate([
4351
- Property(false)
4305
+ Property(true)
4352
4306
  ], TreeGrid.prototype, "loadChildOnDemand", void 0);
4353
4307
  __decorate([
4354
4308
  Property(false)
@@ -145,7 +145,7 @@ var Render = /** @class */ (function () {
145
145
  var iconRequired = !isNullOrUndefined(data.hasFilteredChildRecords)
146
146
  ? data.hasFilteredChildRecords : data.hasChildRecords;
147
147
  if (iconRequired && !isNullOrUndefined(data.childRecords)) {
148
- if (this.parent['isFromGantt'] && !this.parent.loadChildOnDemand) {
148
+ if (this.parent['isFromGantt'] && this.parent.loadChildOnDemand) {
149
149
  iconRequired = data.hasChildRecords;
150
150
  }
151
151
  else {