From 6d941500cdeed9c1571de79ac4a79658eb2dd87c Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:22:23 +0200 Subject: [PATCH] Bugfix/fix default locale in value component (#3454) * Fix default locale * Update changelog --- CHANGELOG.md | 4 ++++ libs/ui/src/lib/value/value.component.ts | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2d47440b..c9e33c21b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the language localization for German (`de`) - Upgraded `ng-extract-i18n-merge` from version `2.10.0` to `2.12.0` +### Fixed + +- Fixed an issue with the default locale in the value component + ## 2.84.0 - 2024-06-01 ### Added diff --git a/libs/ui/src/lib/value/value.component.ts b/libs/ui/src/lib/value/value.component.ts index 28cb3c90a..7dc427805 100644 --- a/libs/ui/src/lib/value/value.component.ts +++ b/libs/ui/src/lib/value/value.component.ts @@ -27,7 +27,7 @@ export class GfValueComponent implements OnChanges { @Input() isCurrency = false; @Input() isDate = false; @Input() isPercent = false; - @Input() locale = getLocale(); + @Input() locale: string; @Input() position = ''; @Input() precision: number | undefined; @Input() size: 'large' | 'medium' | 'small' = 'small'; @@ -135,6 +135,7 @@ export class GfValueComponent implements OnChanges { this.formattedValue = ''; this.isNumber = false; this.isString = false; + this.locale = this.locale || getLocale(); this.useAbsoluteValue = false; } }