@syncfusion/ej2-filemanager 23.1.43 → 23.2.6

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.
@@ -1625,8 +1625,27 @@ function setNextPath(parent, path) {
1625
1625
  */
1626
1626
  // eslint-disable-next-line
1627
1627
  function openSearchFolder(parent, data) {
1628
- parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1629
1628
  parent.originalPath = getFullPath(parent, data, parent.path);
1629
+ var root = getValue(parent.pathId[0], parent.feParent);
1630
+ var isRoot = getValue('_fm_id', parent.itemData[0]) == 'fe_tree';
1631
+ var key = isNullOrUndefined(getValue('id', root)) ? 'name' : 'id';
1632
+ var searchData = getObject(parent, key, getValue('name', data));
1633
+ if (isNullOrUndefined(searchData)) {
1634
+ if (!isRoot) {
1635
+ parent.notify(clearPathInit, { selectedNode: parent.pathId[parent.pathId.length - 1] });
1636
+ }
1637
+ else {
1638
+ setNextPath(parent, parent.path);
1639
+ return;
1640
+ }
1641
+ }
1642
+ else {
1643
+ var id = getValue('_fm_id', searchData);
1644
+ parent.setProperties({ path: parent.originalPath }, true);
1645
+ parent.pathId.push(id);
1646
+ parent.itemData = [searchData];
1647
+ parent.pathNames.push(getValue('name', searchData));
1648
+ }
1630
1649
  read(parent, (parent.path !== parent.originalPath) ? initialEnd : finalizeEnd, parent.path);
1631
1650
  }
1632
1651
  /**
@@ -6400,6 +6419,7 @@ var ContextMenu$2 = /** @__PURE__ @class */ (function () {
6400
6419
  sItems = _this.parent.selectedItems;
6401
6420
  if (_this.parent.activeModule === 'navigationpane') {
6402
6421
  sItems = [];
6422
+ _this.parent.navigationpaneModule.openFileOnContextMenuClick(closest(_this.targetNodeElement, 'li'));
6403
6423
  }
6404
6424
  GetDetails(_this.parent, sItems, _this.parent.path, 'details');
6405
6425
  break;
@@ -9147,6 +9167,7 @@ var NavigationPane = /** @__PURE__ @class */ (function () {
9147
9167
  this.expandNodeTarget = args.node.getAttribute('data-uid');
9148
9168
  this.parent.expandedId = this.expandNodeTarget;
9149
9169
  this.parent.itemData = this.getTreeData(getValue('id', args.nodeData));
9170
+ this.parent.pathId.push(getValue('id', args.nodeData));
9150
9171
  read(this.parent, nodeExpand, path);
9151
9172
  this.isNodeExpandCalled = true;
9152
9173
  }
@@ -10685,10 +10706,10 @@ var DetailsView = /** @__PURE__ @class */ (function () {
10685
10706
  }
10686
10707
  var name;
10687
10708
  if (dragLi.getElementsByClassName('e-fe-text')[0]) {
10688
- name = dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10709
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-fe-text')[0].innerText;
10689
10710
  }
10690
10711
  else if (dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling) {
10691
- name = dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10712
+ name = this.parent.hasId ? this.gridObj.getRowInfo(dragLi).rowData.id : dragLi.getElementsByClassName('e-rowcell e-templatecell')[0].nextElementSibling.innerText;
10692
10713
  }
10693
10714
  if (dragLi && !dragLi.querySelector('.e-active')) {
10694
10715
  this.selectRecords([name]);