From 4106b9de3ff592ff5d4ab27333a6843fa62ec758 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Mon, 8 Aug 2022 12:17:46 +0200 Subject: [PATCH] Allow removal of English as the default language (#3056) --- src/realm-settings/LocalizationTab.tsx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/realm-settings/LocalizationTab.tsx b/src/realm-settings/LocalizationTab.tsx index ae963dbb37..60145a423b 100644 --- a/src/realm-settings/LocalizationTab.tsx +++ b/src/realm-settings/LocalizationTab.tsx @@ -296,13 +296,11 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { , , - {watchSupportedLocales - .filter((item) => item !== realm.defaultLocale) - .map((locale) => ( - - {localeToDisplayName(locale)} - - ))} + {watchSupportedLocales.map((locale) => ( + + {localeToDisplayName(locale)} + + ))} , ]; @@ -397,17 +395,14 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => { const option = v as string; if (value.includes(option)) { onChange( - value.filter( - (item: string) => - item !== option || option === DEFAULT_LOCALE - ) + value.filter((item: string) => item !== option) ); } else { onChange([...value, option]); } }} onClear={() => { - onChange([DEFAULT_LOCALE]); + onChange([]); }} selections={value} variant={SelectVariant.typeaheadMulti}