Skip to content

Commit c9c1a1c

Browse files
committed
Multiple input bug fixed
1 parent f4fcadc commit c9c1a1c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ If you need to include one of these characters as a static part of the mask, you
2727
<masked-input v-model="phone" mask="+\\1 (111) 111-1111" placeholder="Phone number" type="tel" />
2828
```
2929

30-
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:
30+
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:
3131
```vue
32-
<masked-input mask="+\1 (111) 1111-11" placeholder="Phone" @input="rawVal = arguments[1]" />
32+
<masked-input mask="+\\1 (111) 1111-11" placeholder="Phone" @input="rawVal = arguments[1]" />
3333
```
3434

3535
## Known issues/TODO
3636
* Cut in mobile Chrome
3737
* Cyrillic chars are not supported in mobile Chrome
3838

39-
Found more? Open for feedback and pull requests
39+
Found more? It's open for feedback and pull requests

src/MaskedInput.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ export default {
5151
watch: {
5252
mask: function(newMask) {
5353
this.initMask()
54-
}
54+
},
55+
value: function(newValue) {
56+
if (this.mask_core) this.mask_core.setValue(newValue) //For multiple inputs support
57+
},
5558
},
5659
5760
mounted() {

0 commit comments

Comments
 (0)