@syncfusion/ej2-filemanager 20.1.60 → 20.2.36

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.
@@ -1025,7 +1025,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
1025
1025
  else {
1026
1026
  if (!parent.isFiltered) {
1027
1027
  if (parent.isSortByClicked) {
1028
- parent.notify(layoutChange, { files: parent.largeiconsviewModule.items });
1028
+ parent.notify(layoutChange, { files: (parent.oldView === 'Details') ? parent.detailsviewModule.gridObj.dataSource : parent.largeiconsviewModule.items });
1029
1029
  parent.isSortByClicked = false;
1030
1030
  }
1031
1031
  else {
@@ -1046,6 +1046,7 @@ function searchWordHandler(parent, value, isLayoutChange) {
1046
1046
  * @private
1047
1047
  */
1048
1048
  function updateLayout(parent, view) {
1049
+ parent.oldView = parent.view;
1049
1050
  parent.setProperties({ view: view }, true);
1050
1051
  if (parent.breadcrumbbarModule.searchObj.element.value !== '' || parent.isFiltered) {
1051
1052
  parent.layoutSelectedItems = parent.selectedItems;
@@ -1449,7 +1450,7 @@ function sortbyClickHandler(parent, args) {
1449
1450
  tick = false;
1450
1451
  }
1451
1452
  if (!tick) {
1452
- parent.sortBy = getSortField(args.item.id, parent);
1453
+ parent.sortBy = getSortField(args.item.id);
1453
1454
  }
1454
1455
  else {
1455
1456
  parent.sortOrder = getSortField(args.item.id);
@@ -1463,7 +1464,9 @@ function sortbyClickHandler(parent, args) {
1463
1464
  parent.notify(sortColumn, { module: 'detailsview' });
1464
1465
  }
1465
1466
  }
1466
- updateLayout(parent, parent.view);
1467
+ if (parent.view === 'LargeIcons') {
1468
+ updateLayout(parent, 'LargeIcons');
1469
+ }
1467
1470
  parent.notify(sortByChange, {});
1468
1471
  }
1469
1472
  /**
@@ -1473,24 +1476,12 @@ function sortbyClickHandler(parent, args) {
1473
1476
  * @returns {string} - returns the sorted fields
1474
1477
  * @private
1475
1478
  */
1476
- function getSortField(id, parent) {
1479
+ function getSortField(id) {
1477
1480
  var text = id.substring(id.lastIndexOf('_') + 1);
1478
1481
  var field = text;
1479
- var column;
1480
- if (parent) {
1481
- column = parent.detailsViewSettings.columns;
1482
- }
1483
1482
  switch (text) {
1484
1483
  case 'date':
1485
- for (var i = 0; i < column.length; i++) {
1486
- if (column[i].field === 'dateModified' || column[i].field === 'dateCreated') {
1487
- field = column[i].field;
1488
- break;
1489
- }
1490
- else {
1491
- field = '_fm_modified';
1492
- }
1493
- }
1484
+ field = '_fm_modified';
1494
1485
  break;
1495
1486
  case 'ascending':
1496
1487
  field = 'Ascending';
@@ -6604,7 +6595,7 @@ var FileManager = /** @__PURE__ @class */ (function (_super) {
6604
6595
  _this.droppedObjects = [];
6605
6596
  _this.uploadingCount = 0;
6606
6597
  _this.uploadedCount = 0;
6607
- //Specifies whether the operating system is MAC or not
6598
+ //Specifies whether the operating system is MAC or not
6608
6599
  _this.isMac = false;
6609
6600
  FileManager_1.Inject(BreadCrumbBar, LargeIconsView, ContextMenu$2);
6610
6601
  return _this;
@@ -8002,12 +7993,7 @@ var Toolbar$1 = /** @__PURE__ @class */ (function () {
8002
7993
  items[itemCount].iconCss = this.parent.sortBy === 'size' ? TB_OPTION_DOT : '';
8003
7994
  }
8004
7995
  else if (items[itemCount].id === this.getPupupId('date')) {
8005
- if (this.parent.sortBy === 'dateModified' || this.parent.sortBy === 'dateCreated') {
8006
- items[itemCount].iconCss = this.parent.sortBy === this.parent.sortBy ? TB_OPTION_DOT : '';
8007
- }
8008
- else {
8009
- items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? TB_OPTION_DOT : '';
8010
- }
7996
+ items[itemCount].iconCss = this.parent.sortBy === '_fm_modified' ? TB_OPTION_DOT : '';
8011
7997
  }
8012
7998
  else if (items[itemCount].id === this.getPupupId('ascending')) {
8013
7999
  items[itemCount].iconCss = this.parent.sortOrder === 'Ascending' ? TB_OPTION_TICK : '';