mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-04-23 22:30:37 +00:00
This reverts commit 2ebe4ccfb0.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user