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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamically [mask] removes Special Characters even if [dropSpecialCharacters] ="false" #1345

Open
HenriqueCTMM opened this issue Apr 8, 2024 · 0 comments

Comments

@HenriqueCTMM
Copy link

馃悶 bug report

Is this a regression?

It worked on version 7.9.10 (when i was using Angular 14)
I'm not exactly sure which version the bug started occurring.

Description

The problem arises when dynamically updating the mask directive. The [dropSpecialCharacters] functionality ceases to work upon mask changes, causing the value to lose its special characters. For instance, before the change, the value appears as '12 3456-78901', but after the mask change, it becomes '12345678901'.
While the stackblitz application generates an error, my application does not display that error message. However, the bug persists.

馃敩 Minimal Reproduction

https://stackblitz.com/edit/stackblitz-starters-quncct?file=src%2Fmain.ts

馃敟 Exception or Error


"Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '00 00000-00009'. Current value: '00 0000-00009'. Expression location: DoNotDropSpecialCharacters component."

馃實 Your Environment

*NGX-mask version: ^17.0.7 **
Angular & NGX-mask Version:


@angular-devkit/architect          0.1702.1
@angular-devkit/build-angular      17.2.1
@angular-devkit/core               17.2.1
@angular-devkit/schematics         17.2.1
@angular/cdk                       17.2.1
@angular/cli                       17.2.1
@angular/material                  17.2.1
@angular/material-moment-adapter   17.2.1
@schematics/angular                17.2.1
rxjs                               6.6.7
typescript                         5.3.3
zone.js                            0.14.4
ngx-mask                            17.0.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants