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

Mask Initialization Issue: Extra Digit Added During Initialization #2798

Open
Gerakl22 opened this issue Jun 19, 2024 · 1 comment
Open

Mask Initialization Issue: Extra Digit Added During Initialization #2798

Gerakl22 opened this issue Jun 19, 2024 · 1 comment

Comments

@Gerakl22
Copy link

Describe the bug
During the initialization of the input mask, an extra digit is being added. Specifically, when the mask is configured as 7-999-999 and the initial input value is 7-7__-___, after initialization, the value becomes 7-77_-___. This behavior is unexpected and seems to indicate a problem in the mask initialization process.

To Reproduce
Steps to reproduce the behavior:

  1. Configure the input mask with the following settings:
    const maskConfig = {
        mask: '7-999-999',
     };
  2. Initialize the mask with an initial value of 7-7__-___.
  3. Observe the value after initialization, which changes to 7-77_-___.
  4. Expected behavior
    The value should remain 7-7__-___ after mask initialization.
@Techn1c4l
Copy link

If your mask includes fixed digit 7, I'm pretty sure you should set value of your input field without it in mind i.e. if you want the result to be 7-123-456, you should set your value to 123456.
I believe this is intended behavior.

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

No branches or pull requests

2 participants