From 7a4193073b39aa5147057f417e620ba3b5f6de49 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Thu, 7 Jul 2022 11:54:24 +0200 Subject: [PATCH] Make sure we don't reevaluate the value when there's already a value set (eg. given object of options with value attribute set) --- api/js/etemplate/Et2Select/FindSelectOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/Et2Select/FindSelectOptions.ts b/api/js/etemplate/Et2Select/FindSelectOptions.ts index a43ff8f13a..4fbbbf3eb0 100644 --- a/api/js/etemplate/Et2Select/FindSelectOptions.ts +++ b/api/js/etemplate/Et2Select/FindSelectOptions.ts @@ -226,7 +226,7 @@ export function cleanSelectOptions(options : SelectOption[] | string[] | object) { option = {label: option}; } - option.value = key.trim(); // link_search prefixes keys with one space + option.value = option.value??key.trim(); // link_search prefixes keys with one space fixed_options.push(option); } }