@syncfusion/ej2-filemanager 23.1.40 → 23.1.43-87344

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.
@@ -1476,8 +1476,27 @@ function setNextPath(parent, path) {
1476
1476
  */
1477
1477
  // eslint-disable-next-line
1478
1478
  function openSearchFolder(parent, data) {
1479
- parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1480
1479
  parent.originalPath = getFullPath(parent, data, parent.path);
1480
+ const root = getValue(parent.pathId[0], parent.feParent);
1481
+ const isRoot = getValue('_fm_id', parent.itemData[0]) == 'fe_tree';
1482
+ const key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1483
+ const searchData = getObject(parent, key, getValue('name', data));
1484
+ if (isNullOrUndefined(searchData)) {
1485
+ if (!isRoot) {
1486
+ parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1487
+ }
1488
+ else {
1489
+ setNextPath(parent, parent.path);
1490
+ return;
1491
+ }
1492
+ }
1493
+ else {
1494
+ const id = getValue('_fm_id', searchData);
1495
+ parent.setProperties({ path: parent.originalPath }, true);
1496
+ parent.pathId.push(id);
1497
+ parent.itemData = [searchData];
1498
+ parent.pathNames.push(getValue('name', searchData));
1499
+ }
1481
1500
  read(parent, (parent.path !== parent.originalPath) ? initialEnd : finalizeEnd, parent.path);
1482
1501
  }
1483
1502
  /**
@@ -4192,6 +4211,7 @@ class LargeIconsView {
4192
4211
  this.selectItems([getValue(this.parent.hasId ? 'id' : 'name', this.parent.createdItem)]);
4193
4212
  this.parent.createdItem = null;
4194
4213
  this.parent.largeiconsviewModule.element.focus();
4214
+ this.parent.activeModule = 'largeiconsview';
4195
4215
  }
4196
4216
  onSelectedData() {
4197
4217
  if (this.parent.activeModule === 'largeiconsview') {
@@ -8941,6 +8961,7 @@ class NavigationPane {
8941
8961
  this.expandNodeTarget = args.node.getAttribute('data-uid');
8942
8962
  this.parent.expandedId = this.expandNodeTarget;
8943
8963
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
8964
+ this.parent.pathId.push(getValue('id', args.nodeData));
8944
8965
  read(this.parent, nodeExpand, path);
8945
8966
  this.isNodeExpandCalled = true;
8946
8967
  }
@@ -10476,10 +10497,10 @@ class DetailsView {
10476
10497
  }
10477
10498
  let name;
10478
10499
  if (dragLi.getElementsByClassName('e-fe-text')[0]) {
10479
- name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10500
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10480
10501
  }
10481
10502
  else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
10482
- name = dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10503
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10483
10504
  }
10484
10505
  if (dragLi && !dragLi.querySelector('.e-active')) {
10485
10506
  this.selectRecords([name]);