Revert "AAE-39923 Placeholder transformed with currency based on locale (#11342)" (#11370)

This reverts commit 2ebe4ccfb0.
This commit is contained in:
Tomek Hanaj
2025-11-21 12:00:59 +01:00
committed by GitHub
parent 9a6cd813de
commit eff64284e9
2 changed files with 1 additions and 16 deletions

View File

@@ -105,18 +105,6 @@ describe('AmountWidgetComponent', () => {
expect(widget.placeholder).toBe('1234');
});
it('should setup placeholder when enableDisplayBasedOnLocale is true', () => {
widget.enableDisplayBasedOnLocale = true;
widget.field = new FormFieldModel(null, {
readOnly: false,
placeholder: '1234',
currency: 'USD'
});
widget.ngOnInit();
expect(widget.placeholder).toBe('$1,234');
});
it('it should return locale based on browser', () => {
const expectedLanguage = 'en-US';
widget.enableDisplayBasedOnLocale = true;

View File

@@ -75,10 +75,7 @@ export class AmountWidgetComponent extends WidgetComponent implements OnInit {
valueAsNumber: number;
get placeholder(): string {
if (!this.showPlaceholder) return '';
return this.enableDisplayBasedOnLocale
? this.currencyPipe.transform(this.field.placeholder, this.currency, this.currencyDisplay, this.decimalProperty, this.locale)
: this.field.placeholder;
return this.showPlaceholder ? this.field.placeholder : '';
}
constructor(