@syncfusion/ej2-filemanager 25.2.3 → 25.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.
@@ -6262,15 +6262,29 @@ class ContextMenu$2 {
6262
6262
  this.disabledItems.push('Open');
6263
6263
  }
6264
6264
  }
6265
- else if (this.parent.selectedItems.length !== 1 && this.parent.activeModule !== 'navigationpane') {
6266
- this.disabledItems.push('Rename', 'Paste');
6265
+ else if (this.parent.activeModule !== 'navigationpane') {
6266
+ if (this.parent.selectedItems.length === 1) {
6267
+ const renameIndex = this.disabledItems.indexOf('Rename');
6268
+ if (renameIndex !== -1) {
6269
+ this.disabledItems.splice(renameIndex, 1);
6270
+ }
6271
+ }
6272
+ else {
6273
+ this.disabledItems.push('Rename', 'Paste');
6274
+ }
6267
6275
  }
6268
6276
  }
6269
6277
  setFileItem() {
6270
6278
  this.menuType = 'file';
6271
6279
  this.contextMenu.items = this.getItemData(this.parent.contextMenuSettings.file.map((item) => item.trim()));
6272
6280
  this.contextMenu.dataBind();
6273
- if (this.parent.selectedItems.length !== 1) {
6281
+ if (this.parent.selectedItems.length === 1) {
6282
+ const renameIndex = this.disabledItems.indexOf('Rename');
6283
+ if (renameIndex !== -1) {
6284
+ this.disabledItems.splice(renameIndex, 1);
6285
+ }
6286
+ }
6287
+ else {
6274
6288
  this.disabledItems.push('Rename');
6275
6289
  }
6276
6290
  }
@@ -8743,6 +8757,7 @@ class Virtualization {
8743
8757
  this.scrollPosition = scroll;
8744
8758
  // Update the list of items and the items property of the largeIconInstance
8745
8759
  this.largeIconInstance.itemList = Array.prototype.slice.call(selectAll('.' + LIST_ITEM, this.largeIconInstance.element));
8760
+ this.itemCount = this.itemCount != this.largeIconInstance.itemList.length ? this.largeIconInstance.itemList.length : this.itemCount;
8746
8761
  this.largeIconInstance.items = this.largeIconInstance.allItems.slice(this.renderedCount -
8747
8762
  this.itemCount, this.renderedCount);
8748
8763
  }