diff --git a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts index 3a1185c9c0..88abad03ed 100644 --- a/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts +++ b/api/js/etemplate/Et2Tree/Et2TreeDropdown.ts @@ -1,4 +1,5 @@ -import {html, LitElement, nothing} from "lit"; +import {LitElement, nothing} from "lit"; +import {html, literal, StaticValue} from "lit/static-html.js"; import {Et2Tree, TreeItemData} from "./Et2Tree"; import {Et2WidgetWithSelectMixin} from "../Et2Select/Et2WidgetWithSelectMixin"; import {property} from "lit/decorators/property.js"; @@ -426,6 +427,17 @@ export class Et2TreeDropdown extends Et2WidgetWithSelectMixin(LitElement) `; } + /** + * Tag used for rendering tags when multiple=true + * Used for creating, finding & filtering options. + * @see createTagNode() + * @returns {string} + */ + public get tagTag() : StaticValue + { + return literal`et2-tag`; + } + tagsTemplate() { const value = this.getValueAsArray(); @@ -443,9 +455,9 @@ export class Et2TreeDropdown extends Et2WidgetWithSelectMixin(LitElement) const isEditable = false && !readonly; const image = option ? this.iconTemplate(option?.option ?? option) : null; const isValid = true; - + const tagName = this.tagTag; return html` -