Fixed Bug-53346: Added tree expansion when opening the folder where the file is located.

This commit is contained in:
Tatiana Lopaeva 2021-10-26 10:59:34 +03:00
parent c2d5df2262
commit 6f921f249f

View File

@ -453,9 +453,17 @@ class FilesActionStore {
};
openLocationAction = (locationId, isFolder) => {
const { createNewExpandedKeys, setExpandedKeys } = this.treeFoldersStore;
const locationFilter = isFolder ? this.filesStore.filter : null;
this.filesStore.setBufferSelection(null);
return this.filesStore.fetchFiles(locationId, locationFilter);
return this.filesStore
.fetchFiles(locationId, locationFilter)
.then((data) => {
const pathParts = data.selectedFolder.pathParts;
const newExpandedKeys = createNewExpandedKeys(pathParts);
setExpandedKeys(newExpandedKeys);
});
/*.then(() =>
//isFolder ? null : this.selectRowAction(!checked, item)
);*/