Skip to content

vincjo/datatables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

bed87e1 · Mar 9, 2025
Feb 26, 2025
Feb 6, 2025
Nov 26, 2024
Dec 7, 2022
Feb 6, 2025
Jan 18, 2025
Dec 18, 2022
Oct 21, 2024
Jun 9, 2024
Oct 21, 2024
Jun 5, 2023
Feb 23, 2025
Feb 23, 2025
Oct 24, 2024
Jun 6, 2024
Oct 23, 2024

Repository files navigation

logo

svelte simple datatables

A powerful toolkit for building datatable components.

any text last commit

Docs

Streamline your data workflow with a robust API providing advanced features while reducing code complexity.

🌐 vincjo.fr/datatables

Install

npm i -D @vincjo/datatables

Smooth transition from v1 to v2

In order to make the migration process a little easier, v1 is embed in “legacy” namespace so you will have the opportunity to upgrade your components progressively by simply modifying imports.

- @vincjo/datatables
+ @vincjo/datatables/legacy

- @vincjo/datatables/remote
+ @vincjo/datatables/legacy/remote

Sample code

<script lang="ts">
    import { TableHandler } from '@vincjo/datatables'
    import { someData } from './data'

    const table = new TableHandler(someData, { rowsPerPage: 50 })
</script>

<table>
    <thead>
        <tr>
            <th>First name</th>
            <th>Last name</th>
        </tr>
    </thead>
    <tbody>
        {#each table.rows as row}
            <tr>
                <td>{row.first_name}</td>
                <td>{row.last_name}</td>
            </tr>
        {/each}
    </tbody>
</table>