@syncfusion/ej2-treegrid 26.2.11 → 26.2.14

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.
@@ -2646,7 +2646,17 @@ var DataManipulation = /** @__PURE__ @class */ (function () {
2646
2646
  }
2647
2647
  if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
2648
2648
  ((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent))) {
2649
- currentData.hasChildRecords = true;
2649
+ if (!isNullOrUndefined(currentData[this.parent.childMapping])) {
2650
+ if (currentData[this.parent.childMapping].length > 0) {
2651
+ currentData.hasChildRecords = true;
2652
+ }
2653
+ else {
2654
+ currentData.hasChildRecords = false;
2655
+ }
2656
+ }
2657
+ else {
2658
+ currentData.hasChildRecords = true;
2659
+ }
2650
2660
  if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
2651
2661
  && isNullOrUndefined(currentData[this.parent.childMapping])) {
2652
2662
  currentData.expanded = false;
@@ -4533,9 +4543,9 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
4533
4543
  if (this.treeColumnIndex >= this.columns.length) {
4534
4544
  failureCases.push('TreeColumnIndex value should not exceed the total column count.');
4535
4545
  }
4536
- if (this.enableVirtualization && (!/[0-9]$/.test(this.columnModel.filter(function (col) { return col.width; }).toString())
4537
- && !/[px]$/.test(this.columnModel.filter(function (col) { return col.width; }).toString()))
4538
- || (/[0-9]$/.test(this.height.toString()) && /[px]$/.test(this.height.toString()))) {
4546
+ if (this.enableVirtualization &&
4547
+ (this.columnModel.some(function (col) { return /%$/.test(col.width); }) ||
4548
+ /%$/.test(this.height.toString()))) {
4539
4549
  failureCases.push('column width and height should be in pixels');
4540
4550
  }
4541
4551
  if ((this.childMapping !== 'Children') && !isNullOrUndefined(this.idMapping)) {
@@ -5839,14 +5849,16 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
5839
5849
  if (((target.classList.contains('e-flmenu-cancelbtn') || target.classList.contains('e-flmenu-okbtn')
5840
5850
  || target.classList.contains('e-content') || target.classList.contains('e-rowcell'))
5841
5851
  && !isNullOrUndefined(this.filterModule) && this.isReact)) {
5842
- if (this.grid.filterModule['column'].filterTemplate) {
5843
- var elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
5844
- this.grid.filterModule['fltrDlgDetails'].isOpen = false;
5845
- if (this.grid.filterModule.filterModule['dlgObj'] && !this.grid.filterModule.filterModule['dlgObj'].isDestroyed && elem) {
5846
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5847
- this.clearTemplate(['filterTemplate'], undefined, function () {
5848
- _this.grid.filterModule.filterModule['dlgObj'].destroy();
5849
- });
5852
+ if (!isNullOrUndefined(this.grid.filterModule['column'])) {
5853
+ if (this.grid.filterModule['column'].filterTemplate) {
5854
+ var elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
5855
+ this.grid.filterModule['fltrDlgDetails'].isOpen = false;
5856
+ if (this.grid.filterModule.filterModule['dlgObj'] && !this.grid.filterModule.filterModule['dlgObj'].isDestroyed && elem) {
5857
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5858
+ this.clearTemplate(['filterTemplate'], undefined, function () {
5859
+ _this.grid.filterModule.filterModule['dlgObj'].destroy();
5860
+ });
5861
+ }
5850
5862
  }
5851
5863
  }
5852
5864
  }