summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pipes
diff options
context:
space:
mode:
authordavsad <david.sadlier@est.tech>2021-09-07 15:50:44 +0100
committerMichael Morris <michael.morris@est.tech>2021-09-10 10:34:54 +0000
commitdd69d6a46433c252128df82d0c9aff5dbd5fafec (patch)
tree5577b39687d0c14b7d1868a507e792fe2e96b5c6 /catalog-ui/src/app/ng2/pipes
parentd40595719a4309f4053c8a13432e556577641b95 (diff)
Model hierarchy not being considered while filtering
Issue-ID: SDC-3718 Signed-off-by: davsad <david.sadlier@est.tech> Change-Id: I4a984906aca180d470eb7bd71a09bfb0384cecb6
Diffstat (limited to 'catalog-ui/src/app/ng2/pipes')
-rw-r--r--catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts b/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
index b67f42d4df..29b21cb6da 100644
--- a/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
+++ b/catalog-ui/src/app/ng2/pipes/entity-filter.pipe.ts
@@ -135,11 +135,11 @@ export class EntityFilterPipe implements PipeTransform{
// --------------------------------------------------------------------------
if (filter.selectedModels && filter.selectedModels.length > 0) {
let filteredModels = [];
- let defaultModelPresent = filter.selectedModels.indexOf(DEFAULT_MODEL_NAME) > -1;
+ let allSelectedModels = [].concat.apply([], filter.selectedModels);
angular.forEach(filteredComponents, (component:Component):void => {
- if (filter.selectedModels.indexOf(component.model) > -1) {
+ if (component.model && allSelectedModels.indexOf(component.model) > -1) {
filteredModels.push(component);
- } else if (!component.model && defaultModelPresent) {
+ } else if (!component.model && allSelectedModels.indexOf(DEFAULT_MODEL_NAME) > -1) {
filteredModels.push(component);
}
});