Skip to content

Commit

Permalink
multiSelectionChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz committed Dec 4, 2024
1 parent a95fc6e commit 82c013d
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ qx.Class.define("osparc.file.FolderContent", {

events: {
"selectionChanged": "qx.event.type.Data", // tap
"multiSelectionChanged": "qx.event.type.Data", // tap
"itemSelected": "qx.event.type.Data", // dbltap
"requestDatasetFiles": "qx.event.type.Data",
},
Expand Down Expand Up @@ -229,15 +230,21 @@ qx.Class.define("osparc.file.FolderContent", {
allowEmptySelection: true
});
entries.forEach(entry => {
iconsGroup.add(entry);
if (!this.isMultiSelect()) {
iconsGroup.add(entry);
}
iconsLayout.add(entry);
});
}
this.setSelection([this.getSelectables()[this.getMode() === "icons" ? 0 : 1]]);
},

__itemTapped: function(item) {
this.fireDataEvent("selectionChanged", item);
if (this.isMultiSelect()) {
this.fireDataEvent("multiSelectionChanged", item);
} else {
this.fireDataEvent("selectionChanged", item);
}
},

__itemDblTapped: function(item) {
Expand Down

0 comments on commit 82c013d

Please sign in to comment.