File tree Expand file tree Collapse file tree 3 files changed +4
-55
lines changed
src/routes/(authenticated)/sharelinks Expand file tree Collapse file tree 3 files changed +4
-55
lines changed Original file line number Diff line number Diff line change 11import type { ColumnDef , StringOrTemplateHeader } from '@tanstack/table-core' ;
22import { createRawSnippet } from 'svelte' ;
33import { renderComponent , renderSnippet } from '$lib/components/ui/data-table' ;
4- import DataTableSortButton from './data-table-sort-button .svelte' ;
4+ import DataTableSortButton from '$lib/components/Table/SortButton .svelte' ;
55import DataTableActions from './data-table-actions.svelte' ;
66
77export type ShareLink = {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11<script lang =" ts" generics =" TData, TValue" >
2- import { createSvelteTable , FlexRender } from ' $lib/components/ui/data-table' ;
3- import * as Table from ' $lib/components/ui/table ' ;
2+ import { createSvelteTable } from ' $lib/components/ui/data-table' ;
3+ import Table from ' $lib/components/Table/TableTemplate.svelte ' ;
44 import {
55 getCoreRowModel ,
66 getFilteredRowModel ,
3939 });
4040 </script >
4141
42- <div >
43- <div class =" rounded-md border" >
44- <Table .Root >
45- <Table .Header >
46- {#each table .getHeaderGroups () as headerGroup (headerGroup .id )}
47- <Table .Row >
48- {#each headerGroup .headers as header (header .id )}
49- <Table .Head >
50- {#if ! header .isPlaceholder }
51- <FlexRender
52- content ={header .column .columnDef .header }
53- context ={header .getContext ()}
54- />
55- {/if }
56- </Table .Head >
57- {/each }
58- </Table .Row >
59- {/each }
60- </Table .Header >
61- <Table .Body >
62- {#each table .getRowModel ().rows as row (row .id )}
63- <Table .Row data-state ={row .getIsSelected () && ' selected' }>
64- {#each row .getVisibleCells () as cell (cell .id )}
65- <Table .Cell >
66- <FlexRender content ={cell .column .columnDef .cell } context ={cell .getContext ()} />
67- </Table .Cell >
68- {/each }
69- </Table .Row >
70- {:else }
71- <Table .Row >
72- <Table .Cell colspan ={columns .length } class =" h-24 text-center" >No results.</Table .Cell >
73- </Table .Row >
74- {/each }
75- </Table .Body >
76- </Table .Root >
77- </div >
78- </div >
42+ <Table {table } {columns } />
You can’t perform that action at this time.
0 commit comments