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

fix: emit unmask value to update:modelValue when unmask mode #6407

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

KumJungMin
Copy link
Contributor

@KumJungMin KumJungMin commented Sep 16, 2024

Defect Fixes


how to resolve

Why the issue occured?

  • In version 3 (v3), there was no issue of value mixing when in unmask mode.
  • This is because v3 used native input rather than inputText component and did not pass the value dynamically.
스크린샷 2024-09-16 오후 6 17 56
  • However, in version 4 (v4), inputText component is used, which dynamically receives the value.
  • This causes an issue where the unmasked value is sent with update:model-value, leading to value updates being corrupted.

solution

based on the behavior of v3, the following modifications were made:

  1. currentVal variable was declared to display the masked value in inputText, regardless of whether it is in unmask mode.
  2. The unmasked value is sent with update:model-value when unmask mode.
  3. inputText displays the masked value using currentVal.

result video

2024-09-16.6.22.30.mov

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Sep 16, 2024 9:28am
primevue-v3 ⬜️ Ignored (Inspect) Visit Preview Sep 16, 2024 9:28am

@KumJungMin KumJungMin marked this pull request as ready for review September 16, 2024 09:24
@tugcekucukoglu tugcekucukoglu merged commit 4e451e7 into primefaces:master Sep 25, 2024
4 checks passed
@KumJungMin KumJungMin deleted the fix/issue-6276 branch September 25, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InputMask: input is getting mixed up
2 participants