Looking to create a dynamic table using Vue and trying to add a class to a row when a checkbox is checked. Each checkbox is associated with a specific value in an object of objects. View the code on Codepen.
<tbody>
<tr v-for="row in filteredData"
:key="row.id"
:class="{'is-selected':checkboxes[row.id].checked}">
<td>
<input type="checkbox" v-model="checkboxes[row.id].checked"></td>
<td>{{row.id}}</td>
<td>{{row.name}}</td>
<td>{{row.position}}</td>
<td>{{row.salary}}</td>
</tr>
</tbody>
Despite no errors or warnings, the functionality is not working as expected. Any suggestions for resolving this issue would be greatly appreciated.