Skip to content

Commit

Permalink
feat: update tanstack table
Browse files Browse the repository at this point in the history
Svelte 5 adapter is present in Tanstack Table's v9 alpha, per this issue comment: TanStack/table#5213 (comment)

I am now moving away from hosting a redundant svelte-table package in favor of following tanstack table v9
  • Loading branch information
braden-w committed Aug 6, 2024
1 parent de8aec5 commit c208941
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 470 deletions.
4 changes: 2 additions & 2 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@effect/schema": "^0.70.2",
"@plasmohq/messaging": "^0.6.2",
"@repo/shared": "workspace:*",
"@repo/svelte-table": "workspace:*",
"@tanstack/table-core": "^8.20.1",
"@tanstack/svelte-table": "9.0.0-alpha.10",
"@tanstack/table-core": "9.0.0-alpha.10",
"@tauri-apps/api": "^1.6.0",
"audio-recorder-polyfill": "^0.4.1",
"bits-ui": "^0.21.13",
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@repo/svelte-table';
import '@tanstack/svelte-table';

// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
Expand All @@ -18,7 +18,7 @@ declare global {
}
}

declare module '@repo/svelte-table' {
declare module '@tanstack/svelte-table' {
interface ColumnMeta<TData extends RowData, TValue> {
headerText: string;
}
Expand Down
4 changes: 2 additions & 2 deletions apps/app/src/routes/(config)/recordings/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { cn } from '$lib/utils';
import { createPersistedState } from '$lib/utils/createPersistedState.svelte';
import { Schema as S } from '@effect/schema';
import { FlexRender, createSvelteTable, renderComponent } from '@repo/svelte-table';
import { FlexRender, createTable, renderComponent } from '@tanstack/svelte-table';
import type { ColumnDef, ColumnFilter, Updater } from '@tanstack/table-core';
import { getCoreRowModel, getFilteredRowModel, getSortedRowModel } from '@tanstack/table-core';
import { Effect } from 'effect';
Expand Down Expand Up @@ -169,7 +169,7 @@
const setVisibility = createUpdater(columnVisibility);
const setRowSelection = createUpdater(rowSelection);
const table = createSvelteTable({
const table = createTable({
getRowId: (originalRow) => originalRow.id,
get data() {
return recordings.value;
Expand Down
18 changes: 0 additions & 18 deletions packages/svelte-table/package.json

This file was deleted.

101 changes: 0 additions & 101 deletions packages/svelte-table/src/flex-render.svelte

This file was deleted.

1 change: 0 additions & 1 deletion packages/svelte-table/src/global.d.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/svelte-table/src/index.ts

This file was deleted.

41 changes: 0 additions & 41 deletions packages/svelte-table/src/render-component.ts

This file was deleted.

115 changes: 0 additions & 115 deletions packages/svelte-table/src/table.svelte.ts

This file was deleted.

7 changes: 0 additions & 7 deletions packages/svelte-table/svelte.config.js

This file was deleted.

27 changes: 0 additions & 27 deletions packages/svelte-table/tsconfig.json

This file was deleted.

6 changes: 0 additions & 6 deletions packages/svelte-table/vite.config.ts

This file was deleted.

Loading

0 comments on commit c208941

Please sign in to comment.