@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.
@@ -11279,15 +11279,22 @@ let TreeView = TreeView_1 = class TreeView extends Component {
11279
11279
  }
11280
11280
  else {
11281
11281
  if (typeof this.fields.child === 'string') {
11282
- for (let i = 0, objlen = obj.length; i < objlen; i++) {
11283
- let dataId = getValue(this.fields.id, obj[i]);
11284
- if (dataId && dataId.toString() === parentId) {
11285
- return getValue(this.fields.child, obj[i]);
11286
- }
11287
- else if (!isNullOrUndefined(getValue(this.fields.child, obj[i]))) {
11288
- childNodes = this.getChildNodes(getValue(this.fields.child, obj[i]), parentId);
11289
- if (childNodes !== undefined) {
11290
- break;
11282
+ let index = obj.findIndex((data) => data[this.fields.id] && data[this.fields.id].toString() === parentId);
11283
+ if (index !== -1) {
11284
+ return getValue(this.fields.child, obj[index]);
11285
+ }
11286
+ if (index === -1) {
11287
+ for (let i = 0, objlen = obj.length; i < objlen; i++) {
11288
+ let tempArray = getValue(this.fields.child, obj[i]);
11289
+ let childIndex = !isNullOrUndefined(tempArray) ? tempArray.findIndex((data) => data[this.fields.id] && data[this.fields.id].toString() === parentId) : -1;
11290
+ if (childIndex !== -1) {
11291
+ return getValue(this.fields.child, tempArray[childIndex]);
11292
+ }
11293
+ else if (!isNullOrUndefined(tempArray)) {
11294
+ childNodes = this.getChildNodes(tempArray, parentId);
11295
+ if (childNodes !== undefined) {
11296
+ break;
11297
+ }
11291
11298
  }
11292
11299
  }
11293
11300
  }
@@ -13075,7 +13082,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13075
13082
  if (!isNullOrUndefined(dropLi)) {
13076
13083
  dropIcon1 = select('div.' + ICON, dropLi);
13077
13084
  }
13078
- if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE)) {
13085
+ if (this.dataType === 1 && dropIcon1 && dropIcon1.classList.contains(EXPANDABLE) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
13079
13086
  this.preventExpand = true;
13080
13087
  }
13081
13088
  if (this.dataType !== 1) {
@@ -13095,7 +13102,7 @@ let TreeView = TreeView_1 = class TreeView extends Component {
13095
13102
  for (let i = 0; i < li.length; i++) {
13096
13103
  dropUl.insertBefore(li[i], refNode);
13097
13104
  }
13098
- if (this.dataType === 1 && !isNullOrUndefined(dropLi)) {
13105
+ if (this.dataType === 1 && !isNullOrUndefined(dropLi) && !isNullOrUndefined(this.element.offsetParent) && !this.element.offsetParent.parentElement.classList.contains('e-filemanager')) {
13099
13106
  this.preventExpand = false;
13100
13107
  let dropIcon = select('div.' + ICON, dropLi);
13101
13108
  if (dropIcon && dropIcon.classList.contains(EXPANDABLE)) {