Fix composition view palette filter 06/123406/2
authorstasys10 <stasys.jurgaitis@est.tech>
Thu, 19 Aug 2021 16:10:31 +0000 (17:10 +0100)
committerMichael Morris <michael.morris@est.tech>
Mon, 23 Aug 2021 11:22:05 +0000 (11:22 +0000)
Issue-ID: SDC-3677
Signed-off-by: stasys10 <stasys.jurgaitis@est.tech>
Change-Id: I9025ccdf1aa56fb7b6aee08d1028250c86af1f5a

catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts

index 02d270b..e91798e 100644 (file)
@@ -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;
                     }
                 }