Skip to content

Commit

Permalink
Merge pull request #10148 from archesproject/10147_adv_search_facet_f…
Browse files Browse the repository at this point in the history
…ilter

creates concat str from node names on card, searches facetFilterText …
  • Loading branch information
chrabyrd authored Oct 18, 2023
2 parents 30604d2 + 9fa07d7 commit e5a7021
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ define([
card.nodes = _.filter(response.nodes, function(node) {
return node.nodegroup_id === card.nodegroup_id;
});
card.nodeNamesConcatenated = card.nodes.map(node => node.name).join(' ');
card.addFacet = function() {
_.each(card.nodes, function(node) {
if (self.cardNameDict[node.nodegroup_id] && node.nodeid === node.nodegroup_id) {
Expand Down Expand Up @@ -89,7 +90,7 @@ define([
if (facetFilterText) {
graph.collapsed(false);
return _.filter(graphCards, function(card) {
return card.name.toLowerCase().indexOf(facetFilterText) > -1;
return card.name.toLowerCase().indexOf(facetFilterText) > -1 || card.nodeNamesConcatenated.toLowerCase().indexOf(facetFilterText) > -1;
});
} else {
return graphCards;
Expand Down

0 comments on commit e5a7021

Please sign in to comment.