[Vuejs]-Input data got reset after checkbox is checked when using Vue js

0👍

You need to remove the :value bindings and change them to v-model on your inputs. Like so:

<input input type="text" class="form-control" placeholder="Input Product Name" v-model="ChannelName" id="AddNewChannelName"/>
<input type="text" class="form-control" placeholder="Input Description" v-model="Description" id="AddNewDescription"/>

Your problem was that you were changing the values of your inputs back to ''. When you clicked on a checkbox Vue set your other inputs back to the values in your data object.

Leave a comment