@syncfusion/ej2-navigations 20.3.58 → 20.3.60

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.
@@ -11596,6 +11596,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11596
11596
  return (typeof mapper.child === 'string' || isNullOrUndefined(mapper.child)) ? mapper : mapper.child;
11597
11597
  };
11598
11598
  TreeView.prototype.getChildNodes = function (obj, parentId, isRoot) {
11599
+ var _this = this;
11599
11600
  if (isRoot === void 0) { isRoot = false; }
11600
11601
  var childNodes;
11601
11602
  if (isNullOrUndefined(obj)) {
@@ -11606,15 +11607,22 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
11606
11607
  }
11607
11608
  else {
11608
11609
  if (typeof this.fields.child === 'string') {
11609
- for (var i = 0, objlen = obj.length; i < objlen; i++) {
11610
- var dataId = getValue(this.fields.id, obj[i]);
11611
- if (dataId && dataId.toString() === parentId) {
11612
- return getValue(this.fields.child, obj[i]);
11613
- }
11614
- else if (!isNullOrUndefined(getValue(this.fields.child, obj[i]))) {
11615
- childNodes = this.getChildNodes(getValue(this.fields.child, obj[i]), parentId);
11616
- if (childNodes !== undefined) {
11617
- break;
11610
+ var index = obj.findIndex(function (data) { return data[_this.fields.id] && data[_this.fields.id].toString() === parentId; });
11611
+ if (index !== -1) {
11612
+ return getValue(this.fields.child, obj[index]);
11613
+ }
11614
+ if (index === -1) {
11615
+ for (var i = 0, objlen = obj.length; i < objlen; i++) {
11616
+ var tempArray = getValue(this.fields.child, obj[i]);
11617
+ var childIndex = !isNullOrUndefined(tempArray) ? tempArray.findIndex(function (data) { return data[_this.fields.id] && data[_this.fields.id].toString() === parentId; }) : -1;
11618
+ if (childIndex !== -1) {
11619
+ return getValue(this.fields.child, tempArray[childIndex]);
11620
+ }
11621
+ else if (!isNullOrUndefined(tempArray)) {
11622
+ childNodes = this.getChildNodes(tempArray, parentId);
11623
+ if (childNodes !== undefined) {
11624
+ break;
11625
+ }
11618
11626
  }
11619
11627
  }
11620
11628
  }
@@ -13413,7 +13421,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13413
13421
  if (!isNullOrUndefined(dropLi)) {
13414
13422
  dropIcon1 = select('div.' + ICON, dropLi);
13415
13423
  }
13416
- if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE)) {
13424
+ if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
13417
13425
  this.preventExpand = true;
13418
13426
  }
13419
13427
  if (this.dataType !== 1) {
@@ -13433,7 +13441,7 @@ var TreeView = /** @__PURE__ @class */ (function (_super) {
13433
13441
  for (var i = 0; i < li.length; i++) {
13434
13442
  dropUl.insertBefore(li[i], refNode);
13435
13443
  }
13436
- if (this.dataType === 1 && !isNullOrUndefined(dropLi)) {
13444
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
13437
13445
  this.preventExpand = false;
13438
13446
  var dropIcon = select('div.' + ICON, dropLi);
13439
13447
  if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {