summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app
diff options
context:
space:
mode:
authorstasys10 <stasys.jurgaitis@est.tech>2021-08-19 17:10:31 +0100
committerMichael Morris <michael.morris@est.tech>2021-08-23 11:22:05 +0000
commitf16cc47e14f2c657f1caae59fa614ee8e21b96cd (patch)
treef7e2b391df5e6a2431cd856f9ff5a83c4146a487 /catalog-ui/src/app
parent502c354da7b9f649d3b9e6a00c159a2ad53e7b1f (diff)
Fix composition view palette filter
Issue-ID: SDC-3677 Signed-off-by: stasys10 <stasys.jurgaitis@est.tech> Change-Id: I9025ccdf1aa56fb7b6aee08d1028250c86af1f5a
Diffstat (limited to 'catalog-ui/src/app')
-rw-r--r--catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts b/catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts
index 02d270b39a..e91798ef36 100644
--- a/catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts
+++ b/catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts
@@ -74,7 +74,9 @@ export class PaletteComponent {
const subCategoryToCheck = this.paletteElements[category][subCategory];
const res = subCategoryToCheck.filter((item) => item.searchFilterTerms.toLowerCase().indexOf(searchText) >= 0)
if (res.length > 0) {
- paletteElementsAfterSearch[category] = {};
+ if (paletteElementsAfterSearch[category] == null) {
+ paletteElementsAfterSearch[category] = {};
+ }
paletteElementsAfterSearch[category][subCategory] = res;
}
}