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

Function App

examples/solid/bootstrap/src/App.tsx:65–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63]
64
65function App() {
66 const [data, setData] = createSignal(makeData(10))
67 const rerender = () => setData(makeData(10))
68
69 const table = createSolidTable({
70 get data() {
71 return data()
72 },
73 columns,
74 getCoreRowModel: getCoreRowModel(),
75 })
76
77 return (
78 <div class="p-2">
79 <BTable striped bordered hover responsive size="sm">
80 <thead>
81 <For each={table.getHeaderGroups()}>
82 {headerGroup => (
83 <tr>
84 <For each={headerGroup.headers}>
85 {header => (
86 <th colSpan={header.colSpan}>
87 {header.isPlaceholder
88 ? null
89 : flexRender(
90 header.column.columnDef.header,
91 header.getContext()
92 )}
93 </th>
94 )}
95 </For>
96 </tr>
97 )}
98 </For>
99 </thead>
100 <tbody>
101 <For each={table.getRowModel().rows}>
102 {row => (
103 <tr>
104 <For each={row.getVisibleCells()}>
105 {cell => (
106 <td>
107 {flexRender(
108 cell.column.columnDef.cell,
109 cell.getContext()
110 )}
111 </td>
112 )}
113 </For>
114 </tr>
115 )}
116 </For>
117 </tbody>
118 <tfoot>
119 <For each={table.getFooterGroups()}>
120 {footerGroup => (
121 <tr>
122 <For each={footerGroup.headers}>

Callers

nothing calls this directly

Calls 6

makeDataFunction · 0.90
createSolidTableFunction · 0.90
flexRenderFunction · 0.90
getCoreRowModelFunction · 0.85
getContextMethod · 0.80
rerenderFunction · 0.70

Tested by

no test coverage detected