Allow lowercase letters in monetary currency field
This commit is contained in:
parent
95c24a50f7
commit
c690dad174
@ -35,12 +35,12 @@ export class MonetaryComponent extends AbstractInputComponent<string> {
|
||||
|
||||
get currencyCode(): string {
|
||||
const focused = document.activeElement === this.currencyField?.nativeElement
|
||||
if (focused && this.value) return this.value.match(/^([A-Z]{0,3})/)?.[0]
|
||||
if (focused && this.value) return this.value.match(/^([a-zA-Z]{0,3})/)?.[0]
|
||||
return (
|
||||
this.value
|
||||
?.toString()
|
||||
.toUpperCase()
|
||||
.match(/^([A-Z]{1,3})/)?.[0] ?? this.defaultCurrencyCode
|
||||
.match(/^([a-zA-Z]{1,3})/)?.[0] ?? this.defaultCurrencyCode
|
||||
)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user