From d525918391c7189319929afd68c97d7954d82a79 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 16 Jun 2022 11:04:34 -0600 Subject: [PATCH] SearchMixin: Stick with repeat() over map(), it's slightly more efficient --- api/js/etemplate/Et2Select/SearchMixin.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index ef3c68a6ea..9eb2226b55 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -8,7 +8,7 @@ */ -import {css, html, LitElement, render, SlotMixin} from "@lion/core"; +import {css, html, LitElement, render, repeat, SlotMixin} from "@lion/core"; import {cleanSelectOptions, SelectOption} from "./FindSelectOptions"; import {Validator} from "@lion/form-core"; import {Et2Tag} from "./Tag/Et2Tag"; @@ -690,8 +690,7 @@ export const Et2WithSearchMixin = >(superclass return null; }); - //render(html`${repeat(entries, (option : SelectOption) => option.value, this._optionTemplate.bind(this))}`, - render(entries.map((option) => this._optionTemplate(option)), + render(html`${repeat(entries, (option : SelectOption) => option.value, this._optionTemplate.bind(this))}`, target ); }