I am trying to add checkboxes in vue js datatable but i am unable to do that:
My table body
<tr v-for="user in paginatedUsers" :key="user.id">
<td>
<input type="checkbox" v-model="selected" :value="user.id" number>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
and in my script I have variable of columns where I am trying to do following:
let columns = [
{
name: '__checkbox',
titleClass: 'center aligned',
dataClass: 'center aligned'
},
{label: 'ID', name: 'id' },
{label: 'User Id', name: 'user_id'},
{label: 'Message Title', name: 'message_title'},
{label: 'Process Type', name: 'process_type'},
{label: 'Message Code', name: 'msg_code'},
{label: 'Log Type', name: 'log_type'},
{label: 'Date Time', name: 'created_at'},
];
I have also attached output which I am getting right now, problem is I want top header of checkbox to select all checkboxes but it is not showing at the top left side I need your help please on this
Aucun commentaire:
Enregistrer un commentaire