@syncfusion/ej2-filemanager 29.1.34 → 29.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.
@@ -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
  }
@@ -8097,21 +8094,24 @@ let FileManager = FileManager_1 = class FileManager extends Component {
8097
8094
  if (isBind) {
8098
8095
  this.viewElem = this.view === 'LargeIcons' ? this.largeiconsviewModule.element : this.element.querySelector('.e-gridcontent');
8099
8096
  }
8100
- if (!this.viewElem) {
8101
- return;
8102
- }
8103
8097
  if (isBind) {
8104
8098
  if (this.allowMultiSelection) {
8105
- EventHandler.add(this.viewElem, 'mousedown', this.onDragStart, this);
8106
8099
  this.on(layoutChange, this.onLayoutChange, this);
8107
8100
  this.on(selectionChanged, this.onLayoutChange, this);
8108
8101
  }
8109
8102
  }
8110
8103
  else {
8111
- EventHandler.remove(this.viewElem, 'mousedown', this.onDragStart);
8112
8104
  this.off(layoutChange, this.onLayoutChange);
8113
8105
  this.off(selectionChanged, this.onLayoutChange);
8114
8106
  }
8107
+ if (this.viewElem) {
8108
+ if (isBind && this.allowMultiSelection) {
8109
+ EventHandler.add(this.viewElem, 'mousedown', this.onDragStart, this);
8110
+ }
8111
+ else {
8112
+ EventHandler.remove(this.viewElem, 'mousedown', this.onDragStart);
8113
+ }
8114
+ }
8115
8115
  }
8116
8116
  wireEvents() {
8117
8117
  if (this.enableRangeSelection) {
@@ -8210,7 +8210,9 @@ let FileManager = FileManager_1 = class FileManager extends Component {
8210
8210
  addClass(selectAll('.e-rowcell', item), ['e-active']);
8211
8211
  this.dragSelectedItems.push(item.querySelector('.e-drag-text').textContent);
8212
8212
  }
8213
- item.querySelector('.e-frame').classList.add('e-check');
8213
+ if (this.showItemCheckBoxes) {
8214
+ item.querySelector('.e-frame').classList.add('e-check');
8215
+ }
8214
8216
  }
8215
8217
  }
8216
8218
  }
@@ -8305,6 +8307,7 @@ let FileManager = FileManager_1 = class FileManager extends Component {
8305
8307
  this.notify(modelChanged, { module: 'navigationpane', newProp: newProp, oldProp: oldProp });
8306
8308
  break;
8307
8309
  case 'path':
8310
+ this.oldPath = oldProp.path;
8308
8311
  this.setPath();
8309
8312
  break;
8310
8313
  case 'searchSettings':