Skip to content

Commit a80b336

Browse files
committed
resetSelection after deletion
1 parent 9969ab1 commit a80b336

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ qx.Class.define("osparc.file.FolderContent", {
261261
}
262262
},
263263

264+
resetSelection: function() {
265+
if (this.getMode() === "list") {
266+
const table = this.getChildControl("table");
267+
table.getSelectionModel().resetSelection();
268+
} else if (this.getMode() === "icons") {
269+
const iconsLayout = this.getChildControl("icons-layout");
270+
iconsLayout.resetSelection();
271+
}
272+
},
273+
264274
__selectionChanged: function(selection) {
265275
if (this.isMultiSelect()) {
266276
this.fireDataEvent("multiSelectionChanged", selection);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ qx.Class.define("osparc.file.TreeFolderView", {
138138

139139
pathsDeleted: function(paths) {
140140
console.log("pathsDeleted", paths);
141+
const folderContent = this.getChildControl("folder-viewer").getChildControl("folder-content");
142+
folderContent.resetSelection();
141143
},
142144

143145
openPath: async function(pathParts) {

0 commit comments

Comments
 (0)