I'm trying to create a form where users edit their comments. The input should display the current value of the comment (which is dynamic data coming from a v-for), but I also need to bind the value to a model so that I may send it with my patch request.
Currently the form looks like this
<p @click="editing = true">
Edit comment
</p>
<form v-if="editing" @submit.prevent="editComment(comment._id)">
<input type="text" v-model="comment.message"/>
<button type="submit">
Edit Comment
</button>
</form>
Would there be any way to combine the v-model and :value binding? Or a way to bind the model value aswell and setting the name of the data?
v-modeland:valuebinding? ...wellv-modeldoes bindvalueattribute