ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

Dynamic mask does not work as output pipe

Open ekalin opened this issue 4 years ago • 4 comments

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

ekalin avatar Aug 03 '20 14:08 ekalin

I have the same issue

mauricioat1902 avatar Sep 18 '20 14:09 mauricioat1902

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.

eestein avatar Oct 16 '20 10:10 eestein

I have the same issue

dineikill avatar Nov 05 '20 16:11 dineikill

Same in here!!!

cokita avatar May 17 '21 23:05 cokita

@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

andriikamaldinov1 avatar May 31 '23 13:05 andriikamaldinov1