Skip to content

Commit 16f59c0

Browse files
committed
Add test table to test features before release
1 parent d235e22 commit 16f59c0

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

src/routes/components/table/docs/TableExamplesDocs.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import TableGroups from '../examples/TableGroups.svelte';
1212
import TableSimple from '../examples/TableSimple.svelte';
1313
import TableServer from '../examples/TableServer.svelte';
14+
import TableTest from '../examples/TableTest.svelte';
1415
</script>
1516

1617
<div class="grid gap-1 w-full overflow-auto">
@@ -34,6 +35,10 @@
3435
<h2 class="h2">Server-side tables</h2>
3536
<TableServer />
3637
</div>
38+
<!-- <div id="Testing">
39+
<h2 class="h2">Test tables</h2>
40+
<TableTest />
41+
</div> -->
3742
</div>
3843

3944
<Modal />
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<script lang="ts">
2+
import Table from '$lib/components/Table/Table.svelte';
3+
import type { TableConfig } from '$lib/models/Models';
4+
import { writable } from 'svelte/store';
5+
6+
type ShippingInfo = {
7+
id: number;
8+
address: string;
9+
};
10+
11+
const data = writable<ShippingInfo[]>([
12+
{
13+
id: 1,
14+
address: 'New York, New York, 5th Avenue, 10001, 123456'
15+
},
16+
{
17+
id: 2,
18+
address: 'Los Angeles, California, Hollywood Boulevard, 90028, 654321'
19+
},
20+
{
21+
id: 3,
22+
address: 'Chicago, Illinois, Michigan Avenue, 60601, 987654'
23+
},
24+
{
25+
id: 4,
26+
address: '"Houston", Texas, NASA Parkway, 77058, 456789'
27+
},
28+
{
29+
id: 5,
30+
address: '"Philadelphia, Pennsylvania, Market Street, 19103, 321654"'
31+
}
32+
]);
33+
34+
const addressesConfig: TableConfig<ShippingInfo> = {
35+
id: 'shippingAddresses',
36+
data,
37+
resizable: 'both',
38+
toggle: true,
39+
exportable: true,
40+
fitToScreen: false
41+
};
42+
</script>
43+
44+
<div id="test">
45+
<Table config={addressesConfig} />
46+
</div>

0 commit comments

Comments
 (0)