@syncfusion/ej2-filemanager 22.1.36 → 22.1.39

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.
@@ -2581,7 +2581,7 @@ function renameSuccess(parent, result, path) {
2581
2581
  }
2582
2582
  const args = { action: 'rename', result: result };
2583
2583
  parent.trigger('success', args);
2584
- parent.renamedItem = result.files[0];
2584
+ parent.renamedItem = Array.isArray(result.files) ? result.files[0] : result.files;
2585
2585
  if (getValue('filterPath', parent.renamedItem) === getValue('filterPath', parent.itemData[0]) && parent.pathNames.length > 1) {
2586
2586
  parent.pathNames[parent.pathNames.length - 1] = parent.renameText;
2587
2587
  }
@@ -3607,8 +3607,6 @@ function onReSubmit(parent) {
3607
3607
  }
3608
3608
  const newPath = (parent.activeModule === 'navigationpane') ? getValue('filterPath', parent.itemData[0]).replace(/\\/g, '/') : parent.path;
3609
3609
  parent.renamedId = getValue('id', parent.itemData[0]);
3610
- parent.renamedId = getValue('id', parent.itemData[0]);
3611
- parent.renamedId = getValue('id', parent.itemData[0]);
3612
3610
  if (parent.isFile) {
3613
3611
  const oldExtension = (oIndex === -1) ? '' : parent.currentItemText.substr(oIndex);
3614
3612
  const nIndex = text.lastIndexOf('.');
@@ -8632,7 +8630,8 @@ class NavigationPane {
8632
8630
  addChild(files, target, prevent) {
8633
8631
  // eslint-disable-next-line
8634
8632
  const directories = getDirectories(files);
8635
- if (directories.length > 0) {
8633
+ if (directories.length > 0 &&
8634
+ (directories[0].filterPath == null || this.getTreeData(target)[0].filterPath == null || directories[0].filterPath !== this.getTreeData(target)[0].filterPath)) {
8636
8635
  let length = 0;
8637
8636
  // eslint-disable-next-line
8638
8637
  const folders = directories;