@syncfusion/ej2-treegrid 28.1.37 → 28.1.39

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 (79) hide show
  1. package/README.md +1 -1
  2. package/dist/ej2-treegrid.min.js +2 -2
  3. package/dist/ej2-treegrid.umd.min.js +2 -2
  4. package/dist/ej2-treegrid.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-treegrid.es2015.js +15 -29
  6. package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
  7. package/dist/es6/ej2-treegrid.es5.js +15 -29
  8. package/dist/es6/ej2-treegrid.es5.js.map +1 -1
  9. package/dist/global/ej2-treegrid.min.js +2 -2
  10. package/dist/global/ej2-treegrid.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +8 -7
  13. package/src/treegrid/actions/virtual-scroll.js +13 -5
  14. package/src/treegrid/base/data.js +1 -0
  15. package/src/treegrid/base/treegrid.js +1 -24
  16. package/styles/bds-lite.css +11 -14
  17. package/styles/bds.css +11 -14
  18. package/styles/bootstrap-dark-lite.css +11 -14
  19. package/styles/bootstrap-dark.css +11 -14
  20. package/styles/bootstrap-lite.css +11 -14
  21. package/styles/bootstrap.css +11 -14
  22. package/styles/bootstrap4-lite.css +11 -14
  23. package/styles/bootstrap4.css +11 -14
  24. package/styles/bootstrap5-dark-lite.css +11 -14
  25. package/styles/bootstrap5-dark.css +11 -14
  26. package/styles/bootstrap5-lite.css +11 -14
  27. package/styles/bootstrap5.3-lite.css +11 -14
  28. package/styles/bootstrap5.3.css +11 -14
  29. package/styles/bootstrap5.css +11 -14
  30. package/styles/fabric-dark-lite.css +11 -14
  31. package/styles/fabric-dark.css +11 -14
  32. package/styles/fabric-lite.css +11 -14
  33. package/styles/fabric.css +11 -14
  34. package/styles/fluent-dark-lite.css +11 -14
  35. package/styles/fluent-dark.css +11 -14
  36. package/styles/fluent-lite.css +11 -14
  37. package/styles/fluent.css +11 -14
  38. package/styles/fluent2-lite.css +11 -14
  39. package/styles/fluent2.css +11 -14
  40. package/styles/highcontrast-light-lite.css +11 -14
  41. package/styles/highcontrast-light.css +11 -14
  42. package/styles/highcontrast-lite.css +11 -14
  43. package/styles/highcontrast.css +11 -14
  44. package/styles/material-dark-lite.css +11 -14
  45. package/styles/material-dark.css +11 -14
  46. package/styles/material-lite.css +11 -14
  47. package/styles/material.css +11 -14
  48. package/styles/material3-dark-lite.css +11 -14
  49. package/styles/material3-dark.css +11 -14
  50. package/styles/material3-lite.css +11 -14
  51. package/styles/material3.css +11 -14
  52. package/styles/tailwind-dark-lite.css +11 -14
  53. package/styles/tailwind-dark.css +11 -14
  54. package/styles/tailwind-lite.css +11 -14
  55. package/styles/tailwind.css +11 -14
  56. package/styles/tailwind3-lite.css +11 -14
  57. package/styles/tailwind3.css +11 -14
  58. package/styles/treegrid/_layout.scss +13 -15
  59. package/styles/treegrid/bds.css +11 -14
  60. package/styles/treegrid/bootstrap-dark.css +11 -14
  61. package/styles/treegrid/bootstrap.css +11 -14
  62. package/styles/treegrid/bootstrap4.css +11 -14
  63. package/styles/treegrid/bootstrap5-dark.css +11 -14
  64. package/styles/treegrid/bootstrap5.3.css +11 -14
  65. package/styles/treegrid/bootstrap5.css +11 -14
  66. package/styles/treegrid/fabric-dark.css +11 -14
  67. package/styles/treegrid/fabric.css +11 -14
  68. package/styles/treegrid/fluent-dark.css +11 -14
  69. package/styles/treegrid/fluent.css +11 -14
  70. package/styles/treegrid/fluent2.css +11 -14
  71. package/styles/treegrid/highcontrast-light.css +11 -14
  72. package/styles/treegrid/highcontrast.css +11 -14
  73. package/styles/treegrid/material-dark.css +11 -14
  74. package/styles/treegrid/material.css +11 -14
  75. package/styles/treegrid/material3-dark.css +11 -14
  76. package/styles/treegrid/material3.css +11 -14
  77. package/styles/treegrid/tailwind-dark.css +11 -14
  78. package/styles/treegrid/tailwind.css +11 -14
  79. package/styles/treegrid/tailwind3.css +11 -14
@@ -2376,6 +2376,7 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2376
2376
  this.parent.grid.detailRowModule.expand(expandingTd);
2377
2377
  }
2378
2378
  }
2379
+ this.parent.grid.pageSettings.totalRecordsCount += rowDetails.rows.length;
2379
2380
  }
2380
2381
  else {
2381
2382
  this.fetchRemoteChildData({ action: rowDetails["" + name], record: rowDetails.record, rows: rowDetails.rows, parentRow: rowDetails.parentRow });
@@ -6729,18 +6730,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6729
6730
  this.trigger(expanded, expandArgs);
6730
6731
  }
6731
6732
  }
6732
- if (this.enableVirtualization) {
6733
- var index = this.grid.currentViewData.indexOf(record);
6734
- var expandedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
6735
- if (!isNullOrUndefined(expandedRow)) {
6736
- var rowIndex = +expandedRow.getAttribute('data-rowindex');
6737
- var outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
6738
- var lastBlockIdx = initialTotalRecordsCount - outBuffer;
6739
- if (rowIndex > lastBlockIdx) {
6740
- this.grid.getContent().firstElementChild.scrollTop = rowIndex * this.grid.getRowHeight();
6741
- }
6742
- }
6743
- }
6744
6733
  };
6745
6734
  TreeGrid.prototype.expandCollapseAllChildren = function (record, action, key, level) {
6746
6735
  if ((!isNullOrUndefined(key) && record[this.getPrimaryKeyFieldNames()[0]] !== key) ||
@@ -6856,18 +6845,6 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
6856
6845
  this.grid.getContent().firstElementChild.scrollBy(0, this.grid.getRowHeight());
6857
6846
  }
6858
6847
  }
6859
- if (this.enableVirtualization) {
6860
- var index = this.grid.currentViewData.indexOf(record);
6861
- var collapsedRow = isNullOrUndefined(row) ? this.getRows()[parseInt(index.toString(), 10)] : row;
6862
- if (!isNullOrUndefined(collapsedRow)) {
6863
- var rowIndex = +collapsedRow.getAttribute('data-rowindex');
6864
- var outBuffer = this.grid.pageSettings.pageSize - Math.ceil(this.grid.pageSettings.pageSize / 2);
6865
- var lastBlockIdx = this.grid.totalDataRecordsCount - outBuffer;
6866
- if (rowIndex > lastBlockIdx) {
6867
- this.grid.getContent().firstElementChild.scrollBy(0, (rowIndex - lastBlockIdx) * this.grid.getRowHeight());
6868
- }
6869
- }
6870
- }
6871
6848
  }
6872
6849
  };
6873
6850
  TreeGrid.prototype.updateExpandStateMapping = function (record, state) {
@@ -7542,6 +7519,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
7542
7519
  }
7543
7520
  }
7544
7521
  }
7522
+ this.grid.pageSettings.totalRecordsCount -= rows.length;
7545
7523
  };
7546
7524
  /**
7547
7525
  * Method to sanitize html element
@@ -14551,14 +14529,22 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
14551
14529
  endIndex = startIndex + this.parent.grid.pageSettings.pageSize;
14552
14530
  }
14553
14531
  if (!isNullOrUndefined(this.expandCollapseRec)) {
14554
- var resourceCount = this.parent.getRows();
14532
+ var resourceCount = this.parent.grid.pageSettings.pageSize;
14555
14533
  var sIndex = visualData.indexOf(this.expandCollapseRec);
14556
- var tempdata = visualData.slice(sIndex, sIndex + resourceCount.length);
14557
- if (tempdata.length < resourceCount.length && sIndex >= 0 && startIndex !== 0) {
14558
- sIndex = visualData.length - resourceCount.length;
14534
+ var tempdata = visualData.slice(sIndex, sIndex + resourceCount);
14535
+ if (tempdata.length < resourceCount && sIndex >= 0 && startIndex !== 0) {
14536
+ sIndex = visualData.length - resourceCount;
14559
14537
  sIndex = sIndex > 0 ? sIndex : 0;
14560
- startIndex = sIndex;
14561
14538
  endIndex = visualData.length;
14539
+ if (endIndex - startIndex < resourceCount) {
14540
+ var newRowsCount = sIndex - startIndex;
14541
+ startIndex = sIndex;
14542
+ if (visualData.indexOf(this.expandCollapseRec) > visualData.length - resourceCount / 2) {
14543
+ var newTranslateY = translateY + (newRowsCount * this.parent.grid.getRowHeight());
14544
+ this.parent.grid.contentModule['translateY'] = newTranslateY;
14545
+ this.parent.grid.contentModule.virtualEle.adjustTable(0, newTranslateY);
14546
+ }
14547
+ }
14562
14548
  }
14563
14549
  else if (getValue('isCollapseAll', this.parent)) {
14564
14550
  startIndex = 0;