diff --git a/docs/pages/components/select.md b/docs/pages/components/select.md index 5f7791eb..87256381 100644 --- a/docs/pages/components/select.md +++ b/docs/pages/components/select.md @@ -458,7 +458,8 @@ const App = () => ( ### Custom Tags When multiple options can be selected, you can provide custom tags by passing a function to the `getTag` property. -Your `getTag(option, index)` function can return a string or a Lit Template +Your `getTag(option, index)` function can return a string, a Lit Template, +or an HTMLElement. ```html:preview diff --git a/src/components/select/select.component.ts b/src/components/select/select.component.ts index 6aa4d36f..9bc5a0cd 100644 --- a/src/components/select/select.component.ts +++ b/src/components/select/select.component.ts @@ -178,7 +178,7 @@ export default class SlSelect extends ShoelaceElement implements ShoelaceFormCon * is the current tag's index. The function should return either a Lit TemplateResult or a string containing trusted HTML of the symbol to render at * the specified value. */ - @property() getTag: (option: SlOption, index: number) => TemplateResult | string = option => { + @property() getTag: (option: SlOption, index: number) => TemplateResult | string | HTMLElement = option => { return html`