()
| 78 | ] |
| 79 | |
| 80 | function App() { |
| 81 | const [data, setData] = createSignal(defaultData) |
| 82 | const rerender = () => setData(defaultData) |
| 83 | |
| 84 | const table = createSolidTable({ |
| 85 | get data() { |
| 86 | return data() |
| 87 | }, |
| 88 | columns: defaultColumns, |
| 89 | getCoreRowModel: getCoreRowModel(), |
| 90 | }) |
| 91 | |
| 92 | return ( |
| 93 | <div class="p-2"> |
| 94 | <table> |
| 95 | <thead> |
| 96 | <For each={table.getHeaderGroups()}> |
| 97 | {headerGroup => ( |
| 98 | <tr> |
| 99 | <For each={headerGroup.headers}> |
| 100 | {header => ( |
| 101 | <th> |
| 102 | {header.isPlaceholder |
| 103 | ? null |
| 104 | : flexRender( |
| 105 | header.column.columnDef.header, |
| 106 | header.getContext() |
| 107 | )} |
| 108 | </th> |
| 109 | )} |
| 110 | </For> |
| 111 | </tr> |
| 112 | )} |
| 113 | </For> |
| 114 | </thead> |
| 115 | <tbody> |
| 116 | <For each={table.getRowModel().rows}> |
| 117 | {row => ( |
| 118 | <tr> |
| 119 | <For each={row.getVisibleCells()}> |
| 120 | {cell => ( |
| 121 | <td> |
| 122 | {flexRender( |
| 123 | cell.column.columnDef.cell, |
| 124 | cell.getContext() |
| 125 | )} |
| 126 | </td> |
| 127 | )} |
| 128 | </For> |
| 129 | </tr> |
| 130 | )} |
| 131 | </For> |
| 132 | </tbody> |
| 133 | <tfoot> |
| 134 | <For each={table.getFooterGroups()}> |
| 135 | {footerGroup => ( |
| 136 | <tr> |
| 137 | <For each={footerGroup.headers}> |
nothing calls this directly
no test coverage detected