From: stasys10 Date: Thu, 19 Aug 2021 16:10:31 +0000 (+0100) Subject: Fix composition view palette filter X-Git-Tag: 1.9.1~37 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=f16cc47e14f2c657f1caae59fa614ee8e21b96cd;p=sdc.git Fix composition view palette filter Issue-ID: SDC-3677 Signed-off-by: stasys10 Change-Id: I9025ccdf1aa56fb7b6aee08d1028250c86af1f5a --- 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; } }