How can I add action button to my Datatables Vue 3
How can I add action button to my Datatables Vue 3
jemz
Posts: 131Questions: 40Answers: 1
Hi, can I ask please I want to add action buttons to my datatables vue3 how can I implement it?
<DataTable :data="data" class="table table-hover table-striped" width="100%">
<thead>
<tr>
<th>A</th>
<th>B</th>
</tr>
</thead>
</DataTable>
<script setup lang="ts">
import DataTable from 'datatables.net-vue3';
import DataTablesCore from 'datatables.net-bs4';
const data = defineProps(['customers']);
</script>
Answers
This thread should help, it's asking the same thing.
Colin
@colin
Thank you I will try this link
@colin
I mean action buttons like edit , view, delete,
ex:
You could use a renderer to create those buttons. Another option is to use
columns.defaultContent
like I do here.Allan
Hi @Allan
Thank you I will try this I will be back.
Hi @Allan
Thank you I will try this I will be back.
Hi @allan
Thank you it works
Awesome - thanks for letting me know.
Allan
@allan thanks for the example thats exactly what i need, but not qith JS i need it with Vue3