Update frontend regex
This commit is contained in:
parent
c0f13293f7
commit
5ca731bc8b
@ -51,7 +51,7 @@ export class MonetaryComponent extends AbstractInputComponent<string> {
|
|||||||
get monetaryValue(): string {
|
get monetaryValue(): string {
|
||||||
if (!this.value) return null
|
if (!this.value) return null
|
||||||
const focused = document.activeElement === this.inputField?.nativeElement
|
const focused = document.activeElement === this.inputField?.nativeElement
|
||||||
const val = parseFloat(this.value.toString().replace(/[^0-9.,]+/g, ''))
|
const val = parseFloat(this.value.toString().replace(/[^0-9.,-]+/g, ''))
|
||||||
return focused ? val.toString() : val.toFixed(2)
|
return focused ? val.toString() : val.toFixed(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user