tabulator-table

This commit is contained in:
salam committed 2025-08-18 12:11:26 +02:00
1 parent 92fee3e0a0
commit aee337e75e
15 files changed
+639 -25109

No files matched your search

File diff suppressed because it is too large. Load diff
+29
View File
@@ -0,0 +1,29 @@
var tabledata = [
{ id: 1, name: "Oli Bob", age: "12", col: "red", dob: "" },
{ id: 2, name: "Mary May", age: "1", col: "blue", dob: "14/05/1982" },
{ id: 3, name: "Christine Lobowski", age: "42", col: "green", dob: "22/05/1982" },
{ id: 4, name: "Brendon Philips", age: "125", col: "orange", dob: "01/08/1980" },
{ id: 5, name: "Margret Marmajuke", age: "16", col: "yellow", dob: "31/01/1999" },
];
// console.log('tabledata', tabledata);
import { TabulatorFull as Tabulator } from 'tabulator-tables';
var table = new Tabulator("#example-table", {
height: "311px",
data: tabledata, //assign data to table
layout: "fitColumns", //fit columns to width of table (optional)
columns: [
{ title: "Name", field: "name" },
{ title: "Progress", field: "progress", sorter: "number" },
{ title: "Gender", field: "gender" },
{ title: "Rating", field: "rating" },
{ title: "Favourite Color", field: "col" },
{ title: "Date Of Birth", field: "dob", hozAlign: "center" },
],
});
table.on("rowClick", function (e, row) {
alert("Row " + row.getData().id + " Clicked!!!!");
});