From 7a749a8f544c3139aa89366603e66ed7558bc3f9 Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 15 Mar 2022 11:43:55 +0200 Subject: [PATCH] fix instead of all only last option was selected sometimes because multiple property was not yet synced to DOM node --- api/js/etemplate/Et2Select/Et2Select.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/js/etemplate/Et2Select/Et2Select.ts b/api/js/etemplate/Et2Select/Et2Select.ts index 82f3a8232a..0400e953ee 100644 --- a/api/js/etemplate/Et2Select/Et2Select.ts +++ b/api/js/etemplate/Et2Select/Et2Select.ts @@ -174,6 +174,7 @@ export class Et2Select extends Et2InvokerMixin(Et2WidgetWithSelect) } else { + this._inputNode.multiple = true; // in case property is not yet set, selectbox will unselect all other options this._inputNode.querySelectorAll('option').forEach((el : HTMLOptionElement) => { el.selected = [].concat(value).find(val => val == el.value);