From f16cc47e14f2c657f1caae59fa614ee8e21b96cd Mon Sep 17 00:00:00 2001 From: stasys10 Date: Thu, 19 Aug 2021 17:10:31 +0100 Subject: Fix composition view palette filter Issue-ID: SDC-3677 Signed-off-by: stasys10 Change-Id: I9025ccdf1aa56fb7b6aee08d1028250c86af1f5a --- catalog-ui/src/app/ng2/pages/composition/palette/palette.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src') 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; } } -- cgit 1.2.3-korg