I am completely new to using vuejs and currently working on creating a dynamic table. In this table, the left column will contain hidden input fields that will be used to query a database and display the results in a pop-up window for quick referencing. I have managed to successfully build the table using v-for, but I am struggling with binding the dynamic v-models to a JavaScript function that will process the data. If there is a better approach to achieve this functionality, I would greatly appreciate any advice or suggestions. Thank you!
...
<tr v-for="tableRow in rtnUnsubs">
<td class="unsubCell">
<input name= "[tableRow.share_id]" v-model="[tableRow.share_id]" value="[tableRow.share_id]">{{ tableRow.share_id }}
<button v-on:click="getSub">view</button>
</td>
<td class="unsubCell">{{ tableRow.unsubscriber_type }}</td>
<td class="unsubCell">{{ tableRow.unsubscriber_id }}</td>
</tr>
...
<script>
...
getSub(/*v-model from input*/) {
window.alert(/*perform some actions with v-model*/)
return;
}