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 Component has a problem with value set (v-model) #153

Open
A7I7BEK opened this issue Jul 27, 2020 · 0 comments
Open

Mask Component has a problem with value set (v-model) #153

A7I7BEK opened this issue Jul 27, 2020 · 0 comments

Comments

@A7I7BEK
Copy link

A7I7BEK commented Jul 27, 2020

Description of the problem

I faced with the problem when I re-set the value (set, clear, and set again) to the mask component using v-model

Mask Settings

  • mask: "+998 (##) ###-##-##"
  • value: "+998901234567"
  • masked: false

Expected result

According to nature of the mask component, it re-evaluates the set value, omits predefined values (+998) and returns plain numbers (901234567).

Actual result

However, re-evaluation doesn't work when you re-set the same value again. For example, I set "+998901234567" value, cleared it, and re-set the same value. The re-evaluated output was:

  1. "901234567"
  2. ""
  3. "+998901234567"

Example

Link to codesandbox: https://codesandbox.io/s/vue-the-mask-component-error-ngwot?file=/src/App.vue

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

1 participant