Skip to content

Commit 4533b90

Browse files
committed
first update the filters
1 parent 72aa8f4 commit 4533b90

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ qx.Class.define("osparc.dashboard.SearchBarFilter", {
197197
this.__hideFilterMenu();
198198
}
199199
}, this);
200-
textField.addListener("changeValue", () => this.__filter(), this);
200+
textField.addListener("focusout", () => this.__filter(), this);
201201

202202
const resetButton = this.getChildControl("reset-button");
203203
resetButton.addListener("execute", () => this.__resetFilters(), this);

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,16 +1173,7 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
11731173
});
11741174
searchBarFilterExtended.addListener("filterChanged", e => {
11751175
const data = e.getData();
1176-
// first update the search context if necessary
1177-
const searchContext = data["searchContext"];
1178-
switch (searchContext) {
1179-
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PROJECTS:
1180-
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_TEMPLATES:
1181-
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PUBLIC_TEMPLATES:
1182-
this._changeContext(searchContext);
1183-
break;
1184-
}
1185-
// then update the filters
1176+
// first update the filters
11861177
const filterType = data["filterType"];
11871178
const filterData = data["filterData"];
11881179
switch (filterType) {
@@ -1196,6 +1187,15 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
11961187
this._searchBarFilter.addTagActiveFilter(filterData);
11971188
break;
11981189
}
1190+
// then update the search context this will trigger the search
1191+
const searchContext = data["searchContext"];
1192+
switch (searchContext) {
1193+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PROJECTS:
1194+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_TEMPLATES:
1195+
case osparc.dashboard.StudyBrowser.CONTEXT.SEARCH_PUBLIC_TEMPLATES:
1196+
this._changeContext(searchContext);
1197+
break;
1198+
}
11991199
});
12001200
},
12011201

0 commit comments

Comments
 (0)