Skip to content

Commit fffcb66

Browse files
authored
Fix: service catalog search filter (ITISFoundation#2821)
1 parent a54c0ea commit fffcb66

File tree

1 file changed

+9
-2
lines changed
  • services/web/client/source/class/osparc/dashboard

1 file changed

+9
-2
lines changed

services/web/client/source/class/osparc/dashboard/CardBase.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
8585
resourceData: {
8686
check: "Object",
8787
nullable: false,
88+
init: null,
8889
apply: "__applyResourceData"
8990
},
9091

@@ -401,7 +402,10 @@ qx.Class.define("osparc.dashboard.CardBase", {
401402
},
402403

403404
_shouldApplyFilter: function(data) {
404-
const filterId = "searchBarFilter-" + this.getResourceType();
405+
let filterId = "searchBarFilter";
406+
if (this.isPropertyInitialized("resourceType")) {
407+
filterId += "-" + this.getResourceType();
408+
}
405409
data = filterId in data ? data[filterId] : data;
406410
if (this._filterText(data.text)) {
407411
return true;
@@ -416,7 +420,10 @@ qx.Class.define("osparc.dashboard.CardBase", {
416420
},
417421

418422
_shouldReactToFilter: function(data) {
419-
const filterId = "searchBarFilter-" + this.getResourceType();
423+
let filterId = "searchBarFilter";
424+
if (this.isPropertyInitialized("resourceType")) {
425+
filterId += "-" + this.getResourceType();
426+
}
420427
data = filterId in data ? data[filterId] : data;
421428
if (data.text && data.text.length > 1) {
422429
return true;

0 commit comments

Comments
 (0)