From df0b4f3afbb0caeaf7a28816d320c41a562c692f Mon Sep 17 00:00:00 2001 From: nathan Date: Tue, 26 Jul 2022 09:15:05 -0600 Subject: [PATCH] Fix free entries didn't get added properly for static option selects --- api/js/etemplate/Et2Select/SearchMixin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Select/SearchMixin.ts b/api/js/etemplate/Et2Select/SearchMixin.ts index 8c8672a694..143237231a 100644 --- a/api/js/etemplate/Et2Select/SearchMixin.ts +++ b/api/js/etemplate/Et2Select/SearchMixin.ts @@ -276,7 +276,7 @@ export const Et2WithSearchMixin = >(superclass // Missing any of the required attributes? Don't change anything. // If readonly, skip it - if(!this.searchEnabled && !this.editModeEnabled || this.readonly) + if(!this.searchEnabled && !this.editModeEnabled && !this.allowFreeEntries || this.readonly) { return; } @@ -777,7 +777,7 @@ export const Et2WithSearchMixin = >(superclass // Make sure not to double-add if(!this.select_options.find(o => o.value == text)) { - this.select_options.push({ + this.__select_options.push({ value: text, label: text });