@syncfusion/ej2-filemanager 29.1.34 → 29.1.37

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.
@@ -1304,7 +1304,7 @@ function getSortedData(parent, items) {
1304
1304
  function getObject(parent, key, value) {
1305
1305
  const currFiles = getValue(parent.pathId[parent.pathId.length - 1], parent.feFiles);
1306
1306
  const result = currFiles.filter((data) => data[key].toString() === value);
1307
- return result.length > 0 ? result[0] : null;
1307
+ return result[0];
1308
1308
  }
1309
1309
  /**
1310
1310
  * Creates empty element
@@ -1518,16 +1518,13 @@ function setNextPath(parent, path) {
1518
1518
  const eventName = (folders[i + 1] === '') ? finalizeEnd : initialEnd;
1519
1519
  const newPath = (folders[i] === '') ? '/' : (parent.path + folders[i] + '/');
1520
1520
  const data = getObject(parent, key, folders[parseInt(i.toString(), 10)]);
1521
- if (!isNullOrUndefined(data)) {
1522
- const id = getValue('_fm_id', data);
1523
- parent.setProperties({ path: newPath }, true);
1521
+ const id = getValue('_fm_id', data);
1522
+ parent.setProperties({ path: newPath }, true);
1523
+ if (!isNullOrUndefined(id)) {
1524
1524
  parent.pathId.push(id);
1525
- parent.itemData = [data];
1526
- parent.pathNames.push(getValue('name', data));
1527
- }
1528
- else {
1529
- parent.originalPath = newPath;
1530
1525
  }
1526
+ parent.itemData = [data];
1527
+ parent.pathNames.push(getValue('name', data));
1531
1528
  read(parent, eventName, parent.path);
1532
1529
  break;
1533
1530
  }
@@ -8305,6 +8302,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
8305
8302
  this.notify(modelChanged, { module: 'navigationpane', newProp: newProp, oldProp: oldProp });
8306
8303
  break;
8307
8304
  case 'path':
8305
+ this.oldPath = oldProp.path;
8308
8306
  this.setPath();
8309
8307
  break;
8310
8308
  case 'searchSettings':