Skip to content

Commit

Permalink
Fix unwanted translation on AutoCompleteSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed May 11, 2024
1 parent 06b215d commit d72f2c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/components/Forms/AutocompleteSelect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
export let nullable = false;
export let hide = false;
export let translateOptions = true;
const { value, errors, constraints } = formFieldProxy(form, field);
Expand Down Expand Up @@ -88,7 +89,7 @@
{#if option.suggested}
<span class="text-indigo-600">{option.label}</span>
<span class="text-sm text-gray-500"> (suggested)</span>
{:else if localItems(languageTag())[toCamelCase(option.label)]}
{:else if translateOptions && localItems(languageTag())[toCamelCase(option.label)]}
{localItems(languageTag())[toCamelCase(option.label)]}
{:else}
{option.label}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/components/Forms/ModelForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
{#if model.selectOptions['selected_implementation_groups'] && model.selectOptions['selected_implementation_groups'].length}
<AutocompleteSelect
multiple
translateOptions={false}
{form}
options={model.selectOptions['selected_implementation_groups']}
field="selected_implementation_groups"
Expand Down

0 comments on commit d72f2c6

Please sign in to comment.