MCPcopy
hub / github.com/TanStack/table / App

Function App

examples/solid/sorting/src/App.tsx:12–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10import { createSignal, For, Show } from 'solid-js'
11
12function App() {
13 const [data, setData] = createSignal(makeData(100_000))
14 const [sorting, setSorting] = createSignal<SortingState>([])
15 const refreshData = () => setData(makeData(100_000))
16
17 const columns: ColumnDef<Person>[] = [
18 {
19 header: 'Name',
20 footer: props => props.column.id,
21 columns: [
22 {
23 accessorKey: 'firstName',
24 cell: info => info.getValue(),
25 footer: props => props.column.id,
26 },
27 {
28 accessorFn: row => row.lastName,
29 id: 'lastName',
30 cell: info => info.getValue(),
31 header: () => <span>Last Name</span>,
32 footer: props => props.column.id,
33 },
34 ],
35 },
36 {
37 header: 'Info',
38 footer: props => props.column.id,
39 columns: [
40 {
41 accessorKey: 'age',
42 header: () => 'Age',
43 footer: props => props.column.id,
44 },
45 {
46 header: 'More Info',
47 columns: [
48 {
49 accessorKey: 'visits',
50 header: () => <span>Visits</span>,
51 footer: props => props.column.id,
52 },
53 {
54 accessorKey: 'status',
55 header: 'Status',
56 footer: props => props.column.id,
57 },
58 {
59 accessorKey: 'progress',
60 header: 'Profile Progress',
61 footer: props => props.column.id,
62 },
63 ],
64 },
65 ],
66 },
67 ]
68
69 const table = createSolidTable({

Callers

nothing calls this directly

Calls 8

makeDataFunction · 0.90
createSolidTableFunction · 0.90
flexRenderFunction · 0.90
getCoreRowModelFunction · 0.85
getSortedRowModelFunction · 0.85
sortingFunction · 0.85
getContextMethod · 0.80
refreshDataFunction · 0.70

Tested by

no test coverage detected