Unopinionated and extensible data tables for Svelte
Bot releases are hidden (Show)
Published by bryanmylee 9 months ago
Avoid importing SvelteComponent
as a class and only import its type definition for TypeScript.
Published by bryanmylee 10 months ago
Fix missing utility function and type exports.
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.18.0...v0.18.1
Published by bryanmylee 10 months ago
Finally got around to moving the source files to SvelteKit 2 and getting rid of all the custom packaging logic I used before. This should fix all type issues for the foreseeable future, at least until Svelte 5 replaces Svelte 4 🥲.
A lot of thanks to @ryanylee for getting the ball rolling on the migration and fixes!
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.7...v0.18.0
Published by bryanmylee about 1 year ago
Published by bryanmylee about 1 year ago
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.5...v0.17.6
Published by bryanmylee about 1 year ago
.id
for display columns by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/142
compareFn
for the addSortBy plugin. by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/143
render
column option for addColumnFilters by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/144
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.4...v0.17.5
Published by bryanmylee over 1 year ago
Migrated the documentation website to the latest version of KitDocs and SvelteKit, so Vercel no longer complains about broken builds 🎉. This also includes an expanded credits section that includes @blerrgh and @risalfajar for their contributions while I was busy!
While working on a better sorting comparator, this should alleviate any requirements for date sorting.
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.3...v0.17.4
Published by bryanmylee over 1 year ago
Published by bryanmylee over 1 year ago
Thanks to @risalfajar for a helpful change to how column header
s can be defined.
header
as column's alternative id by @risalfajar in https://github.com/bryanmylee/svelte-headless-table/pull/118
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.2...v0.17.3
Published by bryanmylee over 1 year ago
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.1...v0.17.2
Published by bryanmylee almost 2 years ago
addSortBy
interaction with serverSide
by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/97
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.0...v0.17.1
Published by bryanmylee almost 2 years ago
Thanks to the amazing @blerrgh for his work on server-side support for core plugins such as addSortBy
, addColumnFilters
, addTableFilter
, and addPagination
!
Server-side support allows you to handle data manipulation on your server instead of on the browser. When enabled on a plugin, it will not have any effect on the table rows. Instead, it will treat the existing data as though it has already been modified on the server but continue to update its own state. This lets you use Svelte Headless Table as a state manager for your server.
Simply pass serverSide: true
when instantiating a plugin to enable server-side data manipulation.
const data = writable([...]);
const table = createTable(data, {
sort: addSortBy({ serverSide: true }),
filter: addTableFilter({ serverSide: true }),
page: addPagination({ serverSide: true }),
});
const columns = table.createColumns(...);
const {rows, pluginStates} = table.createViewModel(columns);
const {sortKeys} = pluginStates.sort;
const {filterValue} = pluginStates.filter;
const {pageSize, pageIndex} = pluginStates.filter;
async function updateQuery() {
const q = new URLSearchParams();
q.set('order_by', $sortKeys[0].id);
q.set('order_dir', $sortKeys[0].order);
q.set('filter', $filterValue);
q.set('limit', String($pageSize));
q.set('skip', String($pageSize * $pageIndex));
$data = await fetch(`/api_endpoint?${q});
}
// ...
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.16.2...v0.17.0
Published by bryanmylee almost 2 years ago
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.16.1...v0.16.2
Published by bryanmylee almost 2 years ago
Published by bryanmylee almost 2 years ago
svelte-render
has been updated to allow slot contents in createRender
with v1.6.0
.
Now you can define components like:
const columns = table.createColumns([
table.column({
header: 'Name',
accessor: 'name',
cell: ({value}) => createRender(Label).slot(value),
}),
]);
to produce
<Label>{value}</Label>
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.15.3...v0.16.0
Published by bryanmylee almost 2 years ago
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.15.2...v0.15.3
Published by bryanmylee almost 2 years ago
allPageRowsSelected
behavior when setting to false
by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/81
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.15.1...v0.15.2
Published by bryanmylee about 2 years ago
Svelte package is behaving weirdly with Svelte Headless Table.
This should fix the weird typing export issues.
Published by bryanmylee about 2 years ago
Extracted createRender
and Render
into a separate package, and extended functionality to provide event handling for custom rendered components.
Render
to svelte-render
by @bryanmylee in https://github.com/bryanmylee/svelte-headless-table/pull/59
Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.14.4...v0.15.0
Published by bryanmylee about 2 years ago