Skip to content

Commit

Permalink
Fix: service catalog search filter (#2821)
Browse files Browse the repository at this point in the history
  • Loading branch information
odeimaiz authored Feb 11, 2022
1 parent a54c0ea commit fffcb66
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions services/web/client/source/class/osparc/dashboard/CardBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ qx.Class.define("osparc.dashboard.CardBase", {
resourceData: {
check: "Object",
nullable: false,
init: null,
apply: "__applyResourceData"
},

Expand Down Expand Up @@ -401,7 +402,10 @@ qx.Class.define("osparc.dashboard.CardBase", {
},

_shouldApplyFilter: function(data) {
const filterId = "searchBarFilter-" + this.getResourceType();
let filterId = "searchBarFilter";
if (this.isPropertyInitialized("resourceType")) {
filterId += "-" + this.getResourceType();
}
data = filterId in data ? data[filterId] : data;
if (this._filterText(data.text)) {
return true;
Expand All @@ -416,7 +420,10 @@ qx.Class.define("osparc.dashboard.CardBase", {
},

_shouldReactToFilter: function(data) {
const filterId = "searchBarFilter-" + this.getResourceType();
let filterId = "searchBarFilter";
if (this.isPropertyInitialized("resourceType")) {
filterId += "-" + this.getResourceType();
}
data = filterId in data ? data[filterId] : data;
if (data.text && data.text.length > 1) {
return true;
Expand Down

0 comments on commit fffcb66

Please sign in to comment.