Replies: 2 comments 1 reply
-
Maybe you could use standard |
Beta Was this translation helpful? Give feedback.
0 replies
-
Update: If I utilize both <script setup>
import { vMaska } from "maska"
import { formSore } from "@/stores/myForm"
const store = formStore()
</script>
<template>
<input
type="text"
name="phone"
v-model="store.form.phone.unmasked"
v-maska="store.form.phone"
data-maska="(###) ###-####"
/>
</template> import { defineStore } from "pinia"
export const formStore = defineStore({
id: "myForm",
persist: true,
state: () => ({
form: {
first_name: '',
last_name: '',
email: '',
phone: {
completed: '',
masked: '',
unmasked: ''
},
}
})
}) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am storing the maska object in a pinia store.
My pinia store has persisted state enabled.
Upon page reload, the maska input is not re-populated.
I can confirm that the object is being persisted.
How can I resolve this? See demonstration:
Beta Was this translation helpful? Give feedback.
All reactions