Skip to content

Commit

Permalink
Web: Files: fixed updating the folder tree after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
gopienkonikita committed Nov 2, 2021
1 parent 96d12d3 commit 2141932
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions products/ASC.Files/Client/src/store/UploadDataStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,23 +520,25 @@ class UploadDataStore {
} else {
addNewFile();
}
} else if (needUpdateTree) {
const {
expandedKeys,
setExpandedKeys,
treeFolders,
} = this.treeFoldersStore;
const newExpandedKeys = expandedKeys.filter((x) => x !== folderId + "");
setExpandedKeys(newExpandedKeys);

let path = this.selectedFolderStore.pathParts.slice(0);

loopTreeFolders(
path,
treeFolders,
this.filesStore.folders,
this.filesStore.folders.length
);

if (needUpdateTree) {
const {
expandedKeys,
setExpandedKeys,
treeFolders,
} = this.treeFoldersStore;
const newExpandedKeys = expandedKeys.filter((x) => x !== folderId + "");
setExpandedKeys(newExpandedKeys);

let path = this.selectedFolderStore.pathParts.slice(0);

loopTreeFolders(
path,
treeFolders,
this.filesStore.folders,
this.filesStore.folders.length
);
}
}
};

Expand Down

0 comments on commit 2141932

Please sign in to comment.