Sorting Ξ
<div id="basicdatatable"></div>
Rovnaké ako v základnom príklade...
<table border="1" width="100%" cellspacing="0" cellpadding="3">
<thead>
<!-- SORTING -->
<tr>
<th>No.</th>
<th>
<!-- SORTING NUMBER -->
<bdt-sort type="number" field="fld_ID" @sorting="sorting">ID</bdt-sort>
</th>
<th>
<!-- SORTING STRING -->
<bdt-sort field="fld_Name" @sorting="sorting">Name</bdt-sort>
</th>
<th>
<!-- SORTING DATE -->
<bdt-sort type="date" field="fld_Date_Iso" @sorting="sorting">Date</bdt-sort>
</th>
</tr>
</thead>
<tbody>
<tr v-for="(item, index) in pageItems" :key="item.fld_ID">
<td align="center"> {{ ((page -1) * limit) +index +1 }}. </td>
<td> {{ item.fld_ID }} </td>
<td> {{ item.fld_Name }} </td>
<td> {{ item.fld_Date_Iso }} </td>
</tr>
</tbody>
</table>
import basicDataTable from "https://api.pim.sk/api/basic-data-table/bdt.min.mjs"
const bdt = new basicDataTable({
id: "bdtBex",
selector: "#basicdatatable",
items: data,
template: template
});