From 164beeea929373d56cd97d54b5f6a5a82c4ae4ff Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Sun, 15 Feb 2026 23:40:32 +0700 Subject: [PATCH] feat(lib): change locale to input signal --- .../historical-market-data-editor.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts index f3dc4cc20..d99e78e20 100644 --- a/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts +++ b/libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor.component.ts @@ -13,6 +13,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, + input, Input, OnChanges, OnDestroy, @@ -65,7 +66,6 @@ export class GfHistoricalMarketDataEditorComponent @Input() currency: string; @Input() dataSource: DataSource; @Input() dateOfFirstActivity: string; - @Input() locale = getLocale(); @Input() marketData: MarketData[]; @Input() symbol: string; @Input() user: User; @@ -90,6 +90,8 @@ export class GfHistoricalMarketDataEditorComponent }; } = {}; + public readonly locale = input(getLocale()); + protected readonly days = Array(31); private unsubscribeSubject = new Subject(); @@ -109,7 +111,7 @@ export class GfHistoricalMarketDataEditorComponent } public ngOnChanges() { - this.defaultDateFormat = getDateFormatString(this.locale); + this.defaultDateFormat = getDateFormatString(this.locale()); this.historicalDataItems = this.marketData.map(({ date, marketPrice }) => { return {