vincjo / datatables

A toolkit for creating datatable components with Svelte
https://vincjo.fr/datatables
MIT License
425 stars 15 forks source link

Svelte 5 #97

Closed xmlking closed 3 months ago

xmlking commented 4 months ago

Wonder if this library compatible with svelte v5? Any plans to implement with runes?

vincjo commented 4 months ago

Yes, this lib can be used with Svelte 5.

Full support implementing runes is in progress. Basically, stores will be replaced by runes, getters() by properties.

Svelte 4

const handler = new DataHandler(data)
const rows = handler.getRows()
const currentPage = handler.getCurrentPage()
// $rows, $currentPage

Svelte 5

const table = new TableHandler(data)
// table.rows, table.currentPage
vincjo commented 3 months ago

Added a note to the readme and published a preview site.