Closed louis-neologix closed 6 months ago
@louis-neologix Thanks for using Ngx-mask. We have changed the behavior in recent versions, but we have added the ability to transpose values. inputTransfromFn => change model and input value outputTransfromFn => change only in model
You can write your own function that will return the value you need.
🐞 bug report
Is this a regression?
Yes, the previous version in which this bug was not present was: 13.1.9
Description
I just upgraded a projet from angular 12 to 13 and ngx-mask as well. Before the upgrade, when I had a masked input with "separator.2", my formcontrol got string values. For example, when i entered "55.0" in my input, my formcontrol's value was "55.0" with string type. Since the upgrade (and more precisely between 13.1.9 and 13.1.10), my formcontrol's value now receives the value 55 with number type.
I don't know if this is intentional but for me it is problematic as I need to keep the precision of the entered value.
🔬 Minimal Reproduction
I tried to create a stackblitz to show the problem but there's a compilation error (maybe because of #981) :worried:
https://stackblitz.com/edit/angular-13-starter-project-ubncdb
🌍 Your Environment
Angular Version: