I need help creating a form that allows users to edit their comments. The challenge is to display the current value of the comment using dynamic data from v-for, while also binding the value to a model for sending it with a patch request.
Here is an example of how the form currently appears:
<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>
Is there a way to merge the v-model and :value binding? Or perhaps a method to bind the model value and specify the data name?