Skip to content

Commit 6d76362

Browse files
committed
refactor
1 parent e2f0683 commit 6d76362

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

services/static-webserver/client/source/class/osparc/dashboard/SearchBarFilter.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,16 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
5454
HEIGHT: 36,
5555
BG_COLOR: "input_background",
5656

57+
getInitialFilterData: function() {
58+
return {
59+
tags: [],
60+
classifiers: [],
61+
sharedWith: null,
62+
appType: null,
63+
text: ""
64+
};
65+
},
66+
5767
getSharedWithOptions: function(resourceType) {
5868
if (resourceType === "template") {
5969
resourceType = "tutorial";
@@ -406,13 +416,7 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
406416
},
407417

408418
getFilterData: function() {
409-
const filterData = {
410-
tags: [],
411-
classifiers: [],
412-
sharedWith: null,
413-
appType: null,
414-
text: ""
415-
};
419+
const filterData = this.self().getInitialFilterData();
416420
const textFilter = this.getTextFilterValue();
417421
filterData["text"] = textFilter ? textFilter : "";
418422
this.getChildControl("active-filters").getChildren().forEach(chip => {

0 commit comments

Comments
 (0)