From 7e5c907b71b88b593fed77e8f730b4fe33661a9e Mon Sep 17 00:00:00 2001 From: Jan-Gerke Salomon Date: Tue, 17 Oct 2023 14:45:47 +0200 Subject: [PATCH] fix(searchable single selects): use old-app default labels --- .../CategoryComboSelect/useOptionsQuery.ts | 4 +--- .../ModelSingleSelect/ModelSingleSelect.tsx | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/metadataFormControls/CategoryComboSelect/useOptionsQuery.ts b/src/components/metadataFormControls/CategoryComboSelect/useOptionsQuery.ts index 277f904a..d3b0b3f1 100644 --- a/src/components/metadataFormControls/CategoryComboSelect/useOptionsQuery.ts +++ b/src/components/metadataFormControls/CategoryComboSelect/useOptionsQuery.ts @@ -64,9 +64,7 @@ export function useOptionsQuery() { value: id, // This should be distinguishable from other selects // where "none" means no selection - label: isDefault - ? i18n.t('Default (none)') - : displayName, + label: isDefault ? i18n.t('None') : displayName, } }) || []), ]) diff --git a/src/components/metadataFormControls/ModelSingleSelect/ModelSingleSelect.tsx b/src/components/metadataFormControls/ModelSingleSelect/ModelSingleSelect.tsx index 04623c55..cf6b672a 100644 --- a/src/components/metadataFormControls/ModelSingleSelect/ModelSingleSelect.tsx +++ b/src/components/metadataFormControls/ModelSingleSelect/ModelSingleSelect.tsx @@ -38,7 +38,11 @@ function computeDisplayOptions({ : options if (!required) { - return [{ value: '', label: i18n.t('None') }, ...withSelectedOption] + // This default value has been copied from the old app + return [ + { value: '', label: i18n.t('') }, + ...withSelectedOption, + ] } return withSelectedOption