DataTable use ajax with vuejs

DataTable use ajax with vuejs

Long LundyLong Lundy Posts: 4Questions: 1Answers: 0

why is datatable use ajax when has event Order data from server has be change but template #student has be not change like data from server?

<template>
<DataTable :columns="columns" :options="options" :ajax="ajax/json" class="display nowrap"
width="100%">
<template #student="props">
<span>{{props.rowData.Name}}</span>
<span>{{props.rowData.Age}}</span>
</template>
</DataTable>

</template>

import DataTable from "datatables.net-vue3"; import DataTablesCore from "datatables.net"; import "datatables.net-responsive-dt"; import "datatables.net-responsive"; import "datatables.net-fixedheader-dt"; import "datatables.net-fixedcolumns-dt"; import "datatables.net-rowreorder-dt"; // init dataTable DataTable.use(DataTablesCore); const columns = [ {title:'Id',data:'Id',className:'all',}, {title:'Student',data:null,className:'',render:'#student'}, {title:'Score',data:Score',className:'',}, ]

Replies

Sign In or Register to comment.