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

Ignoring prefix in pasted content

Open MoxxiManagarm opened this issue 3 years ago • 2 comments

🚀 feature request

Description

I want the defined prefix to be ignored within pasted strings.

<input mask="AAA-AAA-AAA" prefix="FOO-" />

Currently, when I paste "FOO-DDD-DDD-DDD" on that input field, the value becomes "FOO-FOO-DDD-DDD". But I want the "FOO-" of the pasted content to be ignored.

Describe the solution you'd like

Please let me decide whether or not to ignore the beginning of a string matching the prefix, when the full string is pasted.

Describe alternatives you've considered

MoxxiManagarm avatar Jul 05 '22 13:07 MoxxiManagarm

Any suggestion for a workaround appreciated.

MoxxiManagarm avatar Jul 05 '22 13:07 MoxxiManagarm

any ideas or updates ?

Nabeeh-AlSawaf avatar Sep 10 '22 01:09 Nabeeh-AlSawaf

@MoxxiManagarm @Nabeeh-AlSawaf Thanks for your using Ngx-Mask. Please update to latest version. It example, all work as expected - https://stackblitz.com/edit/angular-tpudhe?file=src%2Fmain.ts

andriikamaldinov1 avatar Jun 02 '23 09:06 andriikamaldinov1