@syncfusion/ej2-treegrid 26.2.11 → 26.2.12

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.
@@ -2478,7 +2478,17 @@ class DataManipulation {
2478
2478
  }
2479
2479
  if ((!isNullOrUndefined(currentData[this.parent.childMapping]) && !isCountRequired(this.parent)) ||
2480
2480
  ((currentData[this.parent.hasChildMapping]) && isCountRequired(this.parent))) {
2481
- currentData.hasChildRecords = true;
2481
+ if (!isNullOrUndefined(currentData[this.parent.childMapping])) {
2482
+ if (currentData[this.parent.childMapping].length > 0) {
2483
+ currentData.hasChildRecords = true;
2484
+ }
2485
+ else {
2486
+ currentData.hasChildRecords = false;
2487
+ }
2488
+ }
2489
+ else {
2490
+ currentData.hasChildRecords = true;
2491
+ }
2482
2492
  if (this.parent.enableCollapseAll || !isNullOrUndefined(this.parent.dataStateChange)
2483
2493
  && isNullOrUndefined(currentData[this.parent.childMapping])) {
2484
2494
  currentData.expanded = false;
@@ -5532,14 +5542,16 @@ let TreeGrid = TreeGrid_1 = class TreeGrid extends Component {
5532
5542
  if (((target.classList.contains('e-flmenu-cancelbtn') || target.classList.contains('e-flmenu-okbtn')
5533
5543
  || target.classList.contains('e-content') || target.classList.contains('e-rowcell'))
5534
5544
  && !isNullOrUndefined(this.filterModule) && this.isReact)) {
5535
- if (this.grid.filterModule['column'].filterTemplate) {
5536
- const elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
5537
- this.grid.filterModule['fltrDlgDetails'].isOpen = false;
5538
- if (this.grid.filterModule.filterModule['dlgObj'] && !this.grid.filterModule.filterModule['dlgObj'].isDestroyed && elem) {
5539
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5540
- this.clearTemplate(['filterTemplate'], undefined, () => {
5541
- this.grid.filterModule.filterModule['dlgObj'].destroy();
5542
- });
5545
+ if (!isNullOrUndefined(this.grid.filterModule['column'])) {
5546
+ if (this.grid.filterModule['column'].filterTemplate) {
5547
+ const elem = document.getElementById(this.grid.filterModule.filterModule['dlgObj'].element.id);
5548
+ this.grid.filterModule['fltrDlgDetails'].isOpen = false;
5549
+ if (this.grid.filterModule.filterModule['dlgObj'] && !this.grid.filterModule.filterModule['dlgObj'].isDestroyed && elem) {
5550
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5551
+ this.clearTemplate(['filterTemplate'], undefined, () => {
5552
+ this.grid.filterModule.filterModule['dlgObj'].destroy();
5553
+ });
5554
+ }
5543
5555
  }
5544
5556
  }
5545
5557
  }