Commit c9c1a1c0 authored by Roma's avatar Roma

Multiple input bug fixed

parent f4fcadc8
...@@ -27,13 +27,13 @@ If you need to include one of these characters as a static part of the mask, you ...@@ -27,13 +27,13 @@ If you need to include one of these characters as a static part of the mask, you
<masked-input v-model="phone" mask="+\\1 (111) 111-1111" placeholder="Phone number" type="tel" /> <masked-input v-model="phone" mask="+\\1 (111) 111-1111" placeholder="Phone number" type="tel" />
``` ```
You can also get a raw user input text if you want. Then, instead of using v-model you might need second argument of the input event: You can also get a raw user input text if you want. Instead of using v-model you might need second argument of the input event:
```vue ```vue
<masked-input mask="+\1 (111) 1111-11" placeholder="Phone" @input="rawVal = arguments[1]" /> <masked-input mask="+\\1 (111) 1111-11" placeholder="Phone" @input="rawVal = arguments[1]" />
``` ```
## Known issues/TODO ## Known issues/TODO
* Cut in mobile Chrome * Cut in mobile Chrome
* Cyrillic chars are not supported in mobile Chrome * Cyrillic chars are not supported in mobile Chrome
Found more? Open for feedback and pull requests Found more? It's open for feedback and pull requests
...@@ -51,7 +51,10 @@ export default { ...@@ -51,7 +51,10 @@ export default {
watch: { watch: {
mask: function(newMask) { mask: function(newMask) {
this.initMask() this.initMask()
} },
value: function(newValue) {
if (this.mask_core) this.mask_core.setValue(newValue) //For multiple inputs support
},
}, },
mounted() { mounted() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment