@syncfusion/ej2-treegrid 26.2.12 → 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 +86 -121
  5. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  6. package/dist/es6/ej2-treegrid.es5.js +86 -121
  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 +41 -87
  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
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 26.2.12
3
+ * version : 27.1.48
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. 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@26.2.11",
3
+ "_id": "@syncfusion/ej2-treegrid@20.12.1",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-CXVEcMkoEPpqXqa5fEgBT6Qy8CGgGvULCa2H8CmtuOWE+6E7ey+gV7u5bMqc5AFUJo2BVdsWRmfxXzRQP26gxA==",
5
+ "_integrity": "sha512-FpFdtTXa4ZttioiMFjcyunKzyhR+44TeQH7Ze7Yqustap9WXiWj5sVZRoqsOL+uesc8q+Wa+gFee7lcsfKKDvA==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,10 +24,10 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-26.2.11.tgz",
28
- "_shasum": "6461d8531da1d9896b0e63538bfc85d9706199ae",
27
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-treegrid/-/ej2-treegrid-20.12.1.tgz",
28
+ "_shasum": "d777a44014450e0b1a5eba86fcc8a248adde388e",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
- "_where": "/jenkins/workspace/elease-automation_release_26.1.1/packages/included",
30
+ "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
31
31
  "author": {
32
32
  "name": "Syncfusion Inc."
33
33
  },
@@ -36,10 +36,11 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~26.2.10",
40
- "@syncfusion/ej2-data": "~26.2.10",
41
- "@syncfusion/ej2-grids": "~26.2.12",
42
- "@syncfusion/ej2-popups": "~26.2.11"
39
+ "@syncfusion/ej2-base": "~27.1.48",
40
+ "@syncfusion/ej2-data": "~27.1.48",
41
+ "@syncfusion/ej2-grids": "~27.1.48",
42
+ "@syncfusion/ej2-popups": "~27.1.48",
43
+ "markdown-spellcheck": "^1.3.1"
43
44
  },
44
45
  "deprecated": false,
45
46
  "description": "Essential JS 2 TreeGrid Component",
@@ -76,6 +77,6 @@
76
77
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
77
78
  },
78
79
  "typings": "index.d.ts",
79
- "version": "26.2.12",
80
+ "version": "27.1.48",
80
81
  "sideEffects": false
81
82
  }
@@ -522,6 +522,9 @@ var BatchEdit = /** @class */ (function () {
522
522
  if (!isNullOrUndefined(addRowRecord)) {
523
523
  addRowIndex = addRowRecord.index;
524
524
  }
525
+ if (isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].index)) {
526
+ addRowIndex = 0;
527
+ }
525
528
  if (this.parent.editSettings.newRowPosition !== 'Top' && this.parent.editSettings.newRowPosition !== 'Bottom') {
526
529
  if (isNullOrUndefined(addRecords[parseInt(i.toString(), 10)].parentItem) && this.selectedIndex === -1) {
527
530
  selectedIndex = -1;
@@ -436,7 +436,7 @@ var Edit = /** @class */ (function () {
436
436
  else if (isRemoteData(this.parent) ||
437
437
  (this.parent.dataSource instanceof DataManager && this.parent.dataSource.adaptor instanceof RemoteSaveAdaptor)) {
438
438
  var query = this.parent.grid.query;
439
- if (this.parent['isGantt'] && !this.parent.loadChildOnDemand) {
439
+ if (this.parent['isGantt'] && this.parent.loadChildOnDemand) {
440
440
  this.updateCell(args, rowIndex_1);
441
441
  setValue('isEdit', false, this.parent.grid);
442
442
  this.afterCellSave(args, row_1);
@@ -796,6 +796,7 @@ var Edit = /** @class */ (function () {
796
796
  this.addRowIndex = this.parent.grid.selectedRowIndex > -1 ? this.parent.grid.selectedRowIndex : 0;
797
797
  }
798
798
  }
799
+ var selectedRecords = this.parent.getSelectedRecords()[0];
799
800
  if ((this.isAddedRowByMethod || (this.isAddedRowByContextMenu && this.parent.grid.selectedRowIndex !== -1)) &&
800
801
  (this.parent.enableVirtualization || this.parent.enableInfiniteScrolling)) {
801
802
  this.addRowRecord = this.parent.flatData[this.parent.grid.selectedRowIndex];
@@ -803,8 +804,8 @@ var Edit = /** @class */ (function () {
803
804
  this.addRowRecord = this.parent.getCurrentViewRecords()[this.addRowIndex];
804
805
  }
805
806
  }
806
- else {
807
- this.addRowRecord = this.parent.getSelectedRecords()[0];
807
+ else if (!isNullOrUndefined(selectedRecords)) {
808
+ this.addRowRecord = selectedRecords;
808
809
  }
809
810
  }
810
811
  if (this.isAddedRowByMethod && args.index !== 0) {
@@ -136,7 +136,9 @@ var ExcelExport = /** @class */ (function () {
136
136
  ExcelExport.prototype.manipulateExportProperties = function (property, dtSrc, queryResult) {
137
137
  //count not required for this query
138
138
  var args = Object();
139
- setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
139
+ if (!isNullOrUndefined(this.parent.grid.getDataModule())) {
140
+ setValue('query', this.parent.grid.getDataModule().generateQuery(true), args);
141
+ }
140
142
  setValue('isExport', true, args);
141
143
  if (!isNullOrUndefined(property) && !isNullOrUndefined(property.exportType)) {
142
144
  setValue('exportType', property.exportType, args);
@@ -9,6 +9,8 @@ export declare class VirtualScroll {
9
9
  private parent;
10
10
  private expandCollapseRec;
11
11
  private prevstartIndex;
12
+ setEndIndexToGantt: boolean;
13
+ ganttEndIndex: number;
12
14
  private prevendIndex;
13
15
  private visualData;
14
16
  private prevrequestType;
@@ -32,6 +32,7 @@ var VirtualScroll = /** @class */ (function () {
32
32
  */
33
33
  function VirtualScroll(parent) {
34
34
  this.prevstartIndex = -1;
35
+ this.setEndIndexToGantt = true;
35
36
  this.prevendIndex = -1;
36
37
  this.prevSelectedRecord = [];
37
38
  this.parent = parent;
@@ -131,11 +132,16 @@ var VirtualScroll = /** @class */ (function () {
131
132
  this.parent.grid.notify(events.virtualActionArgs, { setTop: true });
132
133
  }
133
134
  if ((requestType === 'save' && pageingDetails.actionArgs.index >= (counts.count - this.parent.grid.pageSettings.pageSize)) || (requestType === 'refresh' && this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
134
- if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count && (this.parent.root && counts.count - counts.endIndex === this.visualData.length - this.parent.root['previousFlatData'].length))
135
+ if (this.setEndIndexToGantt) {
136
+ this.ganttEndIndex = counts.endIndex;
137
+ }
138
+ if ((counts.endIndex + this.parent.pageSettings.pageSize >= counts.count && (this.parent.root && counts.count - this.ganttEndIndex === this.visualData.length - this.parent.root['previousFlatData'].length))
135
139
  || !(this.parent['isGantt'] && this.parent['isAddedFromGantt'])) {
136
140
  startIndex = counts.startIndex + (counts.count - counts.endIndex);
137
141
  endIndex = counts.count;
142
+ this.setEndIndexToGantt = false;
138
143
  }
144
+ this.ganttEndIndex = endIndex;
139
145
  this.parent['isAddedFromGantt'] = false;
140
146
  }
141
147
  //if ((this.prevendIndex !== -1 && this.prevstartIndex !== -1) &&
@@ -210,12 +210,12 @@ var DataManipulation = /** @class */ (function () {
210
210
  this.parent.query.expands = [];
211
211
  }
212
212
  if (!this.parent.hasChildMapping && !this.parentItems.length &&
213
- (!this.parent.loadChildOnDemand)) {
213
+ (this.parent.loadChildOnDemand)) {
214
214
  this.zerothLevelData = args;
215
215
  setValue('cancel', true, args);
216
216
  }
217
217
  else {
218
- if (!this.parent.loadChildOnDemand) {
218
+ if (this.parent.loadChildOnDemand) {
219
219
  var _loop_1 = function (rec) {
220
220
  if (isCountRequired(this_1.parent) && records[parseInt(rec.toString(), 10)].hasChildRecords &&
221
221
  this_1.parent.initialRender) {
@@ -260,22 +260,22 @@ var DataManipulation = /** @class */ (function () {
260
260
  else {
261
261
  var dataResults = 'dataResults';
262
262
  var expandRecord = 'expandRecord';
263
- if (!isNullOrUndefined(records) && !((this.parent.loadChildOnDemand) && isCountRequired(this.parent) && !isNullOrUndefined(this.parent["" + dataResults]["" + expandRecord])) &&
264
- !(isRemoteData(this.parent) && this.parent.loadChildOnDemand && args["" + actionArgs].isExpandCollapse && this.parent.enableVirtualization)) {
263
+ if (!isNullOrUndefined(records) && !((!this.parent.loadChildOnDemand) && isCountRequired(this.parent) && !isNullOrUndefined(this.parent["" + dataResults]["" + expandRecord])) &&
264
+ !(isRemoteData(this.parent) && !this.parent.loadChildOnDemand && args["" + actionArgs].isExpandCollapse && this.parent.enableVirtualization)) {
265
265
  this.convertToFlatData(records);
266
266
  }
267
267
  }
268
268
  }
269
- if (isRemoteData(this.parent) && this.parent.loadChildOnDemand && args["" + actionArgs].isExpandCollapse && this.parent.enableVirtualization) {
269
+ if (isRemoteData(this.parent) && !this.parent.loadChildOnDemand && args["" + actionArgs].isExpandCollapse && this.parent.enableVirtualization) {
270
270
  args.result = records;
271
271
  }
272
- else if (isRemoteData(this.parent) && this.parent.enableVirtualization && !this.parent.loadChildOnDemand) {
272
+ else if (isRemoteData(this.parent) && this.parent.enableVirtualization && this.parent.loadChildOnDemand) {
273
273
  args.result = records;
274
274
  }
275
275
  else {
276
- args.result = this.parent.loadChildOnDemand ? this.parent.flatData : records;
276
+ args.result = !this.parent.loadChildOnDemand ? this.parent.flatData : records;
277
277
  }
278
- if (isRemoteData(this.parent) && this.parent.enableVirtualization && this.parent.loadChildOnDemand
278
+ if (isRemoteData(this.parent) && this.parent.enableVirtualization && !this.parent.loadChildOnDemand
279
279
  && this.parent.grid.aggregates.length && this.parent.grid.sortSettings.columns.length === 0
280
280
  && this.parent.grid.filterSettings.columns.length === 0 && !this.parent.grid.searchSettings.key.length) {
281
281
  var query = 'query';
@@ -309,7 +309,7 @@ var DataManipulation = /** @class */ (function () {
309
309
  }
310
310
  for (var i = 0; i < rowDetails.rows.length; i++) {
311
311
  rowDetails.rows[parseInt(i.toString(), 10)].style.display = 'table-row';
312
- if (this.parent.loadChildOnDemand) {
312
+ if (!this.parent.loadChildOnDemand) {
313
313
  var targetEle = rowDetails.rows[parseInt(i.toString(), 10)].getElementsByClassName('e-treegridcollapse')[0];
314
314
  childRecord = this.parent.rowTemplate ?
315
315
  this.parent.grid.getCurrentViewRecords()[rowDetails.rows[parseInt(i.toString(), 10)].rowIndex] :
@@ -373,7 +373,7 @@ var DataManipulation = /** @class */ (function () {
373
373
  var datas = _this.parent.grid.currentViewData.slice();
374
374
  var inx;
375
375
  var idMapping = _this.parent.idMapping;
376
- if (_this.parent['isGantt'] && !_this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
376
+ if (_this.parent['isGantt'] && _this.parent.loadChildOnDemand && _this.parent.hasChildMapping) {
377
377
  for (var i = 0; i < _this.parent.grid.currentViewData.length; i++) {
378
378
  if (rowDetails.record[idMapping] === _this.parent.grid.currentViewData[i][idMapping]) {
379
379
  inx = i;
@@ -497,7 +497,7 @@ var DataManipulation = /** @class */ (function () {
497
497
  _this.parentItems.indexOf(result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping]) !== -1)
498
498
  && !(haveChild && !haveChild[parseInt(r.toString(), 10)])) {
499
499
  result[parseInt(r.toString(), 10)].hasChildRecords = true;
500
- if (_this.parent.enableVirtualization && _this.parent.loadChildOnDemand) {
500
+ if (_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand) {
501
501
  for (var i = 0; i < _this.parent["" + remoteCollapsedData].length; i++) {
502
502
  if (result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]["" + _this.parent.idMapping]) {
503
503
  result[parseInt(r.toString(), 10)].expanded = _this.parent["" + remoteCollapsedData][parseInt(i.toString(), 10)]['expanded'];
@@ -531,7 +531,7 @@ var DataManipulation = /** @class */ (function () {
531
531
  else if (_this.parent.enableVirtualization && result[parseInt(r.toString(), 10)]["" + _this.parent.idMapping] === rowDetails.record["" + _this.parent.idMapping] && rowDetails.action !== 'collapse') {
532
532
  result[parseInt(r.toString(), 10)].expanded = true;
533
533
  }
534
- else if (!(_this.parent.enableVirtualization && _this.parent.loadChildOnDemand)) {
534
+ else if (!(_this.parent.enableVirtualization && !_this.parent.loadChildOnDemand)) {
535
535
  result[parseInt(r.toString(), 10)].expanded = false;
536
536
  }
537
537
  }
@@ -553,7 +553,7 @@ var DataManipulation = /** @class */ (function () {
553
553
  }
554
554
  }
555
555
  if (rowDetails.action === 'remoteExpand' && _this.parent.allowPaging && _this.parent.pageSettings.pageSizeMode === 'All') {
556
- _this.parent.grid.pageSettings.totalRecordsCount = _this.parent.grid.currentViewData.length + result.length;
556
+ _this.parent.grid.pageSettings.totalRecordsCount = _this.parent.grid.pageSettings.totalRecordsCount + result.length;
557
557
  }
558
558
  if (_this.parent.enableVirtualization) {
559
559
  _this.parent.grid.pageSettings.totalRecordsCount = e.count;
@@ -606,21 +606,20 @@ var DataManipulation = /** @class */ (function () {
606
606
  if (!Object.prototype.hasOwnProperty.call(currentData, 'index')) {
607
607
  currentData.index = this.storedIndex;
608
608
  }
609
- if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
610
- ((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent))) {
611
- if (!isNullOrUndefined(currentData[this.parent.childMapping])) {
612
- if (currentData[this.parent.childMapping].length > 0) {
613
- currentData.hasChildRecords = true;
614
- }
615
- else {
616
- currentData.hasChildRecords = false;
617
- }
618
- }
619
- else {
620
- currentData.hasChildRecords = true;
621
- }
609
+ var childMapping = currentData[this.parent.childMapping];
610
+ var hasChildren = !isNullOrUndefined(childMapping) && childMapping.length > 0;
611
+ var shouldCount = isCountRequired(this.parent);
612
+ var hasChildMapping = currentData[this.parent.hasChildMapping];
613
+ if ((hasChildren && !shouldCount) || (hasChildMapping && shouldCount)) {
614
+ currentData.hasChildRecords = true;
615
+ }
616
+ else {
617
+ currentData.hasChildRecords = false;
618
+ }
619
+ if ((!isNullOrUndefined(childMapping) && !shouldCount) ||
620
+ (hasChildMapping) && shouldCount) {
622
621
  if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
623
- && isNullOrUndefined(currentData[this.parent.childMapping])) {
622
+ && isNullOrUndefined(childMapping)) {
624
623
  currentData.expanded = false;
625
624
  }
626
625
  else {
@@ -652,7 +651,7 @@ var DataManipulation = /** @class */ (function () {
652
651
  }
653
652
  currentData.checkboxState = 'uncheck';
654
653
  var remoteCollapsedData = 'remoteCollapsedData';
655
- if (this.parent.enableVirtualization && this.parent.loadChildOnDemand && isRemoteData(this.parent)
654
+ if (this.parent.enableVirtualization && !this.parent.loadChildOnDemand && isRemoteData(this.parent)
656
655
  && !this.parent.initialRender) {
657
656
  if (!currentData.hasChildRecords && isNullOrUndefined(currentData["" + this.parent.parentIdMapping])) {
658
657
  currentData.hasChildRecords = true;
@@ -147,9 +147,12 @@ export interface TreeGridModel extends ComponentModel{
147
147
  allowPaging?: boolean;
148
148
 
149
149
  /**
150
- * If `loadChildOnDemand` is enabled, parent records are render in expanded state.
150
+ * When enabled, only parent records would be rendered during the initial render and child records will be loaded only when expanding a parent record.
151
+ * This property is only applicable for remote data binding.
152
+ * Loading child records on demand can improve the performance of data-bound controls with a large number of records.
153
+ * Child records are only loaded when they are requested, rather than loading all child records at once.
151
154
  *
152
- * @default false
155
+ * @default true
153
156
  */
154
157
  loadChildOnDemand?: boolean;
155
158
 
@@ -86,6 +86,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
86
86
  private isAddedFromGantt;
87
87
  private isIndentEnabled;
88
88
  private indentOutdentAction;
89
+ private isFromChartSide;
89
90
  private parentQuery;
90
91
  private isCollapsedEventTriggered;
91
92
  private isCollapsingEventTriggered;
@@ -314,9 +315,12 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
314
315
  */
315
316
  allowPaging: boolean;
316
317
  /**
317
- * If `loadChildOnDemand` is enabled, parent records are render in expanded state.
318
+ * When enabled, only parent records would be rendered during the initial render and child records will be loaded only when expanding a parent record.
319
+ * This property is only applicable for remote data binding.
320
+ * Loading child records on demand can improve the performance of data-bound controls with a large number of records.
321
+ * Child records are only loaded when they are requested, rather than loading all child records at once.
318
322
  *
319
- * @default false
323
+ * @default true
320
324
  */
321
325
  loadChildOnDemand: boolean;
322
326
  /**
@@ -1288,6 +1292,7 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
1288
1292
  * @hidden
1289
1293
  */
1290
1294
  requiredModules(): ModuleDeclaration[];
1295
+ private resizeCheck;
1291
1296
  extendRequiredModules(modules: ModuleDeclaration[]): void;
1292
1297
  private isCommandColumn;
1293
1298
  /**