maybe i have no luck finding this, but i can't figure it out: i have this field:
<md-input v-if="edit===false" disabled v-model="userdata.username"></md-input>
i am binding the user data in computed with the vuex getter like this:
...mapGetters({
userdata: "getUserData"
})
there is no problem, but when i type out in the field, i got an error because it is not recommendable mutate the state outside of mutations, so, how do i update the state using mutations when i type out in the field?
i have this mutation to update the userdata:
[types.UPDATEUSERDATA] (state, user) {
state.currentUser = user;
}
and this is the getData mutation:
[types.GETUSERDATA] (state) {
return state.currentUser;
}
thanks in advance.