@syncfusion/ej2-filemanager 27.1.53 → 27.2.2

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.
@@ -1526,7 +1526,8 @@ function setNextPath(parent, path) {
1526
1526
  function openSearchFolder(parent, data) {
1527
1527
  parent.originalPath = getFullPath(parent, data, parent.path);
1528
1528
  const root = getValue(parent.pathId[0], parent.feParent);
1529
- const isRoot = getValue('_fm_id', parent.itemData[0]) === 'fe_tree';
1529
+ const navData = parent.feParent[getValue('_fm_id', parent.itemData[0])];
1530
+ const isRoot = isNullOrUndefined(navData) || getValue('_fm_id', navData) === 'fe_tree';
1530
1531
  const key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1531
1532
  const searchData = getObject(parent, key, isFileSystemData(parent) ? getValue('id', data) : getValue('name', data));
1532
1533
  if (isNullOrUndefined(searchData)) {
@@ -3071,7 +3072,7 @@ function performReadOperation(parent, result, fn, data, event, operation, target
3071
3072
  const item = result.files[i];
3072
3073
  setValue('_fm_iconClass', fileType(item), item);
3073
3074
  }
3074
- if (getValue('action', data) === 'read' || isFileSystemData(parent) && getValue('action', data) === 'search') {
3075
+ if (getValue('action', data) === 'read') {
3075
3076
  setNodeId(result, id);
3076
3077
  setValue(id, result.files, parent.feFiles);
3077
3078
  }
@@ -3291,7 +3292,7 @@ function renameSuccess(parent, result) {
3291
3292
  parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
3292
3293
  const renameEventArgs = {
3293
3294
  newName: parent.renamedItem.name,
3294
- itemData: parent.renamedItem,
3295
+ itemData: [parent.renamedItem],
3295
3296
  path: parent.path
3296
3297
  };
3297
3298
  parent.trigger('rename', renameEventArgs);
@@ -9501,7 +9502,7 @@ class Virtualization {
9501
9502
  let itemCount = this.rowItemCount *
9502
9503
  (Math.round(parseFloat(formatUnit(this.largeIconInstance.element.clientHeight)) / this.itemList[0].offsetHeight));
9503
9504
  // If the calculated item count is greater than the data source length, set the item count to the data source length
9504
- if (itemCount > dataSourceLength) {
9505
+ if (itemCount > dataSourceLength || itemCount === 0) {
9505
9506
  itemCount = dataSourceLength;
9506
9507
  }
9507
9508
  return itemCount;
@@ -10177,7 +10178,7 @@ class NavigationPane {
10177
10178
  this.addDragDrop();
10178
10179
  break;
10179
10180
  case 'navigationPaneSettings':
10180
- read(this.parent, finalizeEnd, '/');
10181
+ read(this.parent, finalizeEnd, this.parent.path);
10181
10182
  if (e.oldProp.navigationPaneSettings.sortOrder !== e.newProp.navigationPaneSettings.sortOrder) {
10182
10183
  this.treeObj.sortOrder = e.newProp.navigationPaneSettings.sortOrder;
10183
10184
  }