Closed ghost closed 6 years ago
Nevermind, was my mistake. Sorry about the issue.
@noamcore Hi, could you tell what was a a mistake? I have the same issue, data which is loaded from store not masked.
Sorry @vovek, I can't remember in what project was this issue.
If you create a snippet maybe I can help you.
@vovek same issue for me, didn't find reason
Found solution
//number format - 380931231231
created: function () {
this.$store.dispatch("loadAuthUser", {
withScope: ['addresses'],
}).then(()=>{
let phone = this.currentUser.phone;
this.order = {
...this.order,
firstname: this.currentUser.firstname,
lastname: this.currentUser.lastname,
phone: phone.replace(/38(\d{3})(\d{3})(\d{2})(\d{2})/, "+38 ($1) $2-$3-$4"),
}
});
}
Updating the object passed by
v-model
, the masked input stills empty.