I have the following code in vue-js:
<table class="table table-sm user-perm-list">
<tbody v-for="index in totalUsers" v-bind:key="index">
<tr>
<td>
<div class="text-medium">{{userPermissionsName[index-1]}} </div>
<div class="d-flex py-1">
<a
style="cursor:pointer; margin-right:0.4rem"
@click=userPermissionsDownloadClicked(index-1)
:title="userPermissionsDownload[index-1] ? 'Download Permitted':'Download not permitted'"
v-bind:class="[userPermissionsDownload[index-1] ? 'permission-icon-class-active' : 'permission-icon-class-inactive']">
<downloadPermissionIcon/>
</a>
</div>
</td>
</tr>
</tbody>
</table>
the v-bind:class inside "a" tag is not working. Inside userPermissionsDownloadClicked, I am toggling the variable: userPermissionsDownload[index-1]. It works with a non array variable but not working with array variable
totalUsersvariable?<tbody>for every element intotalUsers? I would expect thev-fordirective to exist on the<tr>element in this case.userPermissionsNamearray? That along with thetotalUsersvariable will help us know where the problem lies