Skip to content

Commit 3b51124

Browse files
committed
setFolder
1 parent 8ed0218 commit 3b51124

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

services/static-webserver/client/source/class/osparc/file/FilesTree.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ qx.Class.define("osparc.file.FilesTree", {
197197

198198
requestPathItems: function(locationId, path) {
199199
const dataStore = osparc.store.Data.getInstance();
200-
dataStore.getItemsByLocationAndPath(locationId, path)
200+
return dataStore.getItemsByLocationAndPath(locationId, path)
201201
.then(items => {
202-
this.__itemsToTree(locationId, path, items);
202+
return this.__itemsToTree(locationId, path, items);
203203
});
204204
},
205205

@@ -402,6 +402,7 @@ qx.Class.define("osparc.file.FilesTree", {
402402
}
403403

404404
this.__filesReceived(locationId, path, items);
405+
return parentModel || null;
405406
},
406407

407408
__itemsToLocation: function(locationId, items) {

services/static-webserver/client/source/class/osparc/file/TreeFolderView.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,12 @@ qx.Class.define("osparc.file.TreeFolderView", {
113113

114114
folderViewer.addListener("requestPathItems", e => {
115115
const data = e.getData();
116-
folderTree.requestPathItems(data.locationId, data.path);
116+
folderTree.requestPathItems(data.locationId, data.path)
117+
.then(pathModel => {
118+
if (osparc.file.FilesTree.isDir(pathModel)) {
119+
folderViewer.setFolder(pathModel);
120+
}
121+
});
117122
}, this);
118123
},
119124

0 commit comments

Comments
 (0)