import { DataTable } from 'simple-datatables'; import 'simple-datatables/dist/style.css'; // Paginate/search/sort any admin table opted in via class="admin-datatable". // Kept off tables that are admin-curated and stay small (games) or where row // order is meaningful and must not be disturbed by sorting (hints). document.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('table.admin-datatable').forEach((table) => { new DataTable(table, { perPage: 25, perPageSelect: [10, 25, 50, 100], searchable: true, sortable: true, labels: { placeholder: 'Search...', perPage: '{select} entries per page', noRows: 'No matching entries found', info: 'Showing {start} to {end} of {rows} entries', }, }); }); });