diff --git a/packages/searchable-dropdown/src/dropdown/element.ts b/packages/searchable-dropdown/src/dropdown/element.ts index db3b1e4f..7953d485 100644 --- a/packages/searchable-dropdown/src/dropdown/element.ts +++ b/packages/searchable-dropdown/src/dropdown/element.ts @@ -139,7 +139,6 @@ export class SearchableDropdownElement selectedItems: Set = new Set([]); updated(props: PropertyValues) { - console.log('props', props); if (props.has('selectedId')) { this.controller.updateSelectedByProp(); } @@ -201,7 +200,7 @@ export class SearchableDropdownElement >
${this.renderItemGraphic(item)}
${text} -
${unsafeHTML(item.meta)}
+
${this.renderItemMeta(item)}
`; } @@ -219,6 +218,20 @@ export class SearchableDropdownElement } } + protected renderItemMeta(item: SearchableDropdownResultItem): ReturnType | void { + const { meta, graphicType } = item; + switch (graphicType) { + case 'inline-html': + return unsafeHTML(meta); + case 'inline-svg': + return unsafeSVG(meta); + default: + if (meta) { + return html``; + } + } + } + /** * Render the menu if state is open * @returns HTMLTemplateResult