Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/options: fix an issue
Adorian Doranb3f071d13d2c
diff --git a/apps/client/src/widgets/type_widgets/options/components/LocaleSelector.tsx b/apps/client/src/widgets/type_widgets/options/components/LocaleSelector.tsxindex cc1bd90b17..9ee67a5689 100644--- a/apps/client/src/widgets/type_widgets/options/components/LocaleSelector.tsx+++ b/apps/client/src/widgets/type_widgets/options/components/LocaleSelector.tsx@@ -15,13 +15,13 @@ export function LocaleSelector({ id, locales, currentValue, onChange, defaultLoc}) {const currentValueWithDefault = currentValue ?? defaultLocale?.id ?? "";const { activeLocale, processedLocales } = useProcessedLocales(locales, defaultLocale, currentValueWithDefault);+ // Deliberately not `portalToBody`, unlike the shorter menus on the other options pages. The card+ // around it is a container and so a backdrop root, which leaves this menu a flat tint rather than+ // frosted. That is the lesser cost: the list runs to every locale Trilium speaks and nothing caps+ // a menu's height, so carried out to the body it would stand in a page that does not scroll, and+ // every locale past the fold would be out of reach.return (- <Dropdown- id={id} text={activeLocale?.name} mobileBottomSheet- // The options card is a container, and so a backdrop root: left inside it the menu- // loses its blur and reads as a flat tint.- portalToBody- >+ <Dropdown id={id} text={activeLocale?.name} mobileBottomSheet>{processedLocales.map((locale, index) => ((typeof locale === "object") ? (<FormListItem