From 6c5f6dd6f66df81dfaa0063ae353e001e5732740 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 8 Jan 2024 10:29:43 +0100 Subject: [PATCH] fix(combobox): some old procedure still have options with trailing white spaces. ensure to trim selected value as well as options.value for better comparison --- app/javascript/shared/combobox.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/shared/combobox.ts b/app/javascript/shared/combobox.ts index 9e78127ca23..b4690038521 100644 --- a/app/javascript/shared/combobox.ts +++ b/app/javascript/shared/combobox.ts @@ -105,7 +105,7 @@ export class Combobox { } const option = this.#visibleOptions.find( - (option) => option.value == maybeValue + (option) => option.value.trim() == maybeValue.trim() ); if (!option) return false;