diff --git a/libs/ui/src/lib/value/value.component.html b/libs/ui/src/lib/value/value.component.html index 3ab711f7e6..c5ebe4e2cf 100644 --- a/libs/ui/src/lib/value/value.component.html +++ b/libs/ui/src/lib/value/value.component.html @@ -46,7 +46,7 @@ [class.justify-content-end]="position === 'end'" > @if (isNumber || value === null) { - @if (colorizeSign && !useAbsoluteValue) { + @if (colorizeSign && !useAbsoluteValue && value !== null) { @if (+value > 0) {
+
} diff --git a/libs/ui/src/lib/value/value.component.ts b/libs/ui/src/lib/value/value.component.ts index cc08e5a248..c2c7d4621d 100644 --- a/libs/ui/src/lib/value/value.component.ts +++ b/libs/ui/src/lib/value/value.component.ts @@ -42,12 +42,12 @@ export class GfValueComponent implements AfterViewInit, OnChanges, OnDestroy { @Input() isCurrency = false; @Input() isDate = false; @Input() isPercent = false; - @Input() locale: string; + @Input() locale?: string; @Input() position = ''; @Input() size: 'large' | 'medium' | 'small' = 'small'; - @Input() subLabel = ''; - @Input() unit = ''; - @Input() value: number | string = ''; + @Input() subLabel?: string = ''; + @Input() unit?: string | null = ''; + @Input() value?: number | string | null = ''; @ViewChild('labelContent', { static: false }) labelContent!: ElementRef; @@ -219,11 +219,14 @@ export class GfValueComponent implements AfterViewInit, OnChanges, OnDestroy { this.isCopied = false; this.isNumber = false; this.isString = false; - this.locale = this.locale || getLocale(); this.useAbsoluteValue = false; if (this.copyToClipboardTimeout) { clearTimeout(this.copyToClipboardTimeout); } + + if (this.locale === undefined || this.locale === '') { + this.locale = getLocale(); + } } }