Advanced Features

Demonstrating URL persistence, row selection, column visibility, CSV export, and quick access to the table's live state.

Library setup

Selection, persistence, and export are enabled from the main constructor, then controlled through the table instance.

const table = new DogTable("#app", {
  pageSize: 5,
  selectable: true,
  persistence: "url",
  remote: {
    url: "https://api.rahmaanms.my.id/api/employees",
    mapResponse: (payload, state) => { /* ... */ }
  },
  columns: [
    { key: "id", label: "ID" },
    { key: "name", label: "Name" },
    { key: "role", label: "Role" }
  ]
});

table.init();
Selected 0 rows
Visible Columns 5
Active View Page 1