Back Toggle to Dark Mode
This is an example of multiple instances of the AvalynxDataTable. It is a simple table with some random data. The table is sortable, searchable and paginated. The data is fetched from a PHP script.
new AvalynxDataTable("avalynx-datatable", {
apiUrl: "php/result.php",
apiParams: {
"key": "1-2-3-4-5-6-7-8-9-10"
},
perPage: 10,
search: "",
sorting: {
"name": "asc",
"age": "desc"
}
}, {
showLabel: "Zeige",
entriesLabel: "Einträge",
searchLabel: "Suche",
previousLabel: "Zurück",
nextLabel: "Weiter",
showingEntries: (start, end, total) => `Zeige ${start} bis ${end} von ${total} Einträgen`,
showingFilteredEntries: (start, end, filtered, total) => `Zeige ${start} bis ${end} von ${filtered} Einträgen (gefiltert von ${total} Einträgen)`
});
new AvalynxDataTable("avalynx-datatable2", {
apiUrl: "php/result2.get.php",
apiMethod: "GET",
apiParams: {
"key": "1-2-3-4-5-6-7-8-9-10"
},
listPerPage: [5, 10, 15, 20],
perPage: 5,
sorting: {
"price": "asc"
}
});
AvalynxDataTable on GitHub Avalynx on GitHub