diff --git a/CHANGELOG.md b/CHANGELOG.md index 55724668e..00e3ef9cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Improved the value component by always showing the label (also while loading) - Improved the language localization for German (`de`) +### Fixed + +- Fixed an issue with the algebraic sign in the value component + ## 1.248.0 - 2023-03-25 ### Added diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html index 790d99a4e..35be5b808 100644 --- a/libs/ui/src/lib/value/value.component.html +++ b/libs/ui/src/lib/value/value.component.html @@ -48,17 +48,6 @@ - -
- - {{ subLabel }} -
- - - -
+ + +
+ + {{ subLabel }} +
+ + + +
diff --git a/libs/ui/src/lib/value/value.component.ts b/libs/ui/src/lib/value/value.component.ts index d92d87cb1..e4b7779e9 100644 --- a/libs/ui/src/lib/value/value.component.ts +++ b/libs/ui/src/lib/value/value.component.ts @@ -37,6 +37,8 @@ export class ValueComponent implements OnChanges { public constructor() {} public ngOnChanges() { + this.initializeVariables(); + if (this.value || this.value === 0) { if (isNumber(this.value)) { this.isNumber = true; @@ -120,4 +122,12 @@ export class ValueComponent implements OnChanges { this.useAbsoluteValue = true; } } + + private initializeVariables() { + this.absoluteValue = 0; + this.formattedValue = ''; + this.isNumber = false; + this.isString = false; + this.useAbsoluteValue = false; + } }