svelte-headless-table

Unopinionated and extensible data tables for Svelte

Downloads
95.8K
Stars
479
Committers
7

Bot releases are visible (Hide)

svelte-headless-table - v0.18.2 Bump `svelte-render` Latest Release

Published by bryanmylee 9 months ago

Avoid importing SvelteComponent as a class and only import its type definition for TypeScript.

svelte-headless-table - v0.18.1

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

svelte-headless-table - v0.18.0 SvelteKit 2 support

Published by bryanmylee 10 months ago

What's Changed

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!

New Contributors

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.7...v0.18.0

svelte-headless-table - v0.17.7 Cleanup server-side interface

Published by bryanmylee about 1 year ago

svelte-headless-table - v0.17.6 Minor fixes

Published by bryanmylee about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.5...v0.17.6

svelte-headless-table - v0.17.5 Svelte 4 support, addSortBy `compareFn`, QOL improvements

Published by bryanmylee about 1 year ago

What's Changed

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.4...v0.17.5

svelte-headless-table - v0.17.4 Native date sorting

Published by bryanmylee over 1 year ago

What's Changed

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

svelte-headless-table - v0.17.3.patch.1

Published by bryanmylee over 1 year ago

svelte-headless-table - v0.17.3 Optional `header` prop

Published by bryanmylee over 1 year ago

Thanks to @risalfajar for a helpful change to how column headers can be defined.

What's Changed

New Contributors

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.2...v0.17.3

svelte-headless-table - v0.17.2 Nit server-side pagination variable name

Published by bryanmylee over 1 year ago

svelte-headless-table - v0.17.1 Fix sorting server-side check

Published by bryanmylee almost 2 years ago

What's Changed

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.17.0...v0.17.1

svelte-headless-table - v0.17 Server-side support

Published by bryanmylee almost 2 years ago

Server-side support

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.

Usage

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});
}

// ...

What's Changed

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.16.2...v0.17.0

svelte-headless-table - v0.16.2 Fix resize plugin optional config

Published by bryanmylee almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.16.1...v0.16.2

svelte-headless-table - v0.16.1 Expose `onResizeEnd` event for `addResizedColumns`

Published by bryanmylee almost 2 years ago

svelte-headless-table - v0.16.0 Allow slot content with `createRender`

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

svelte-headless-table - v0.15.3 Allow customization of sort toggling order

Published by bryanmylee almost 2 years ago

svelte-headless-table - v0.15.2 Fix addSelectedRows plugin state behavior

Published by bryanmylee almost 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.15.1...v0.15.2

svelte-headless-table - v0.15.1 Fix package types

Published by bryanmylee about 2 years ago

Svelte package is behaving weirdly with Svelte Headless Table.

This should fix the weird typing export issues.

svelte-headless-table - v0.15.0 Render event system

Published by bryanmylee about 2 years ago

What's Changed

Extracted createRender and Render into a separate package, and extended functionality to provide event handling for custom rendered components.

Full Changelog: https://github.com/bryanmylee/svelte-headless-table/compare/v0.14.4...v0.15.0

svelte-headless-table - v0.14.4 `addFlatten` plugin

Published by bryanmylee about 2 years ago