You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug or a design decision, but I'd like to have single-decimal auto-completion when no decimal was entered and an input loses focus.
I'm using mask="separator.1" and [leadZero]="true". So, if I type "1" in the input and click/tab out, nothing happens currently. My goal is to have the input value changed to "1.0" in this scenario. (Auto-completion works with mask="separator.2", mask="separator.3", etc.)
This is my first time looking through the source, but it seems like this might be an intentional design decision (if this is indeed is the right spot) as you're checking to see if Number(separatorPrecision) > 1:
The text was updated successfully, but these errors were encountered:
nathanielbuck
changed the title
Trailing Decimal Not Added When separator.1 and leadZero="true"
Trailing Decimal Not Added When mask="separator.1" and leadZero="true"
Apr 26, 2024
🐞 bug report
Description
I'm not sure if this is a bug or a design decision, but I'd like to have single-decimal auto-completion when no decimal was entered and an input loses focus.
I'm using
mask="separator.1"
and[leadZero]="true"
. So, if I type "1" in the input and click/tab out, nothing happens currently. My goal is to have the input value changed to "1.0" in this scenario. (Auto-completion works withmask="separator.2"
,mask="separator.3"
, etc.)This is my first time looking through the source, but it seems like this might be an intentional design decision (if this is indeed is the right spot) as you're checking to see if
Number(separatorPrecision) > 1
:https://github.com/JsDaddy/ngx-mask/blob/develop/projects/ngx-mask-lib/src/lib/ngx-mask.service.ts#L714C13-L716C62
🔬 Minimal Reproduction
<input mask="separator.1" [leadZero]="true" />
https://stackblitz.com/edit/angular-pft6dj?file=src%2Fmain.ts
🌍 Your Environment
Angular Version:
16.2.12
ngx-mask Version:
16.4.2
The text was updated successfully, but these errors were encountered: