-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Instead of assigning the JVM default locale (Locale.getDefault()) allow customDisplayLocale to be null
LocaleComboBox/src/main/java/com/flowingcode/vaadin/addons/localecombobox/LocaleComboBox.java
Line 77 in e8c83c1
| private Locale customDisplayLocale = Locale.getDefault(); |
LocaleComboBox/src/main/java/com/flowingcode/vaadin/addons/localecombobox/LocaleComboBox.java
Line 113 in e8c83c1
| this.customDisplayLocale = displayLocale == null ? Locale.getDefault() : displayLocale; |
so that you can resolve the current UI locale when needed:
Optional.ofNullable(customDisplayLocale).orElseGet(this::getLocale)
Expected behavior
The component must default to the UI locale, not to the JVM default locale. In turn, Component.getLocale fallbacks to the default locale if it could not obtain a better one.
Minimal reproducible example
No response
Add-on Version
1.0.0-SNAPSHOT
Vaadin Version
N/A
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working