Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic mask does not work as output pipe #773

Closed
ekalin opened this issue Aug 3, 2020 · 5 comments
Closed

Dynamic mask does not work as output pipe #773

ekalin opened this issue Aug 3, 2020 · 5 comments
Labels

Comments

@ekalin
Copy link

ekalin commented Aug 3, 2020

Given a mask '(00) 0000-0000||(00) 00000-0000'. It works fine in an input component, but when used as an output pipe for display, the last number is not displayed.

You can see the problem at https://stackblitz.com/edit/angular-ivy-ptq7pg

@mauricioat1902
Copy link

I have the same issue

@eestein
Copy link

eestein commented Oct 16, 2020

Same problem, what I ended up doing was to check the length of the item and apply the proper mask.

myMask: string;
...
this.myMask = formValue.length === x ? maskX : maskY;

Not ideal, but works for my case.

@dineikill
Copy link

I have the same issue

@cokita
Copy link

cokita commented May 17, 2021

Same in here!!!

@andriikamaldinov1
Copy link
Collaborator

@cokita @dineikill @eestein @ekalin @mauricioat1902 Thanks for your using Ngx-Mask. Please update to latest version.
It example, all work as expected - https://stackblitz.com/edit/angular-dz4pxd?file=src%2Fmain.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants