From c8b6a5760b2c1855ad5adbf4067fa64f5cc768aa Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 15 Sep 2022 08:49:36 -0600 Subject: [PATCH] Et2Select: Re-add accidentally removed chunk that sets initial value when initial value is an array Fixes mail preview didn't show to/from addresses --- api/js/etemplate/Et2Select/SearchMixin.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 01de2590c3..585e6b8a02 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -450,6 +450,16 @@ export const Et2WithSearchMixin = >(superclass { this.createFreeEntry(this.value); } + else if(this.allowFreeEntries && this.multiple) + { + this.value.forEach((e) => + { + if(!this._menuItems.find(o => o.value == e)) + { + this.createFreeEntry(e); + } + }); + } } protected fix_bad_value()