@syncfusion/ej2-filemanager 23.1.43 → 23.2.4

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
  /**
@@ -6238,6 +6257,7 @@ class ContextMenu$2 {
6238
6257
  sItems = this.parent.selectedItems;
6239
6258
  if (this.parent.activeModule === 'navigationpane') {
6240
6259
  sItems = [];
6260
+ this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(this.targetNodeElement, 'li'));
6241
6261
  }
6242
6262
  GetDetails(this.parent, sItems, this.parent.path, 'details');
6243
6263
  break;
@@ -8942,6 +8962,7 @@ class NavigationPane {
8942
8962
  this.expandNodeTarget = args.node.getAttribute('data-uid');
8943
8963
  this.parent.expandedId = this.expandNodeTarget;
8944
8964
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
8965
+ this.parent.pathId.push(getValue('id', args.nodeData));
8945
8966
  read(this.parent, nodeExpand, path);
8946
8967
  this.isNodeExpandCalled = true;
8947
8968
  }
@@ -10477,10 +10498,10 @@ class DetailsView {
10477
10498
  }
10478
10499
  let name;
10479
10500
  if (dragLi.getElementsByClassName('e-fe-text')[0]) {
10480
- name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10501
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10481
10502
  }
10482
10503
  else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
10483
- name = dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10504
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10484
10505
  }
10485
10506
  if (dragLi && !dragLi.querySelector('.e-active')) {
10486
10507
  this.selectRecords([name]);