()
| 13 | import { makeData, Person } from './makeData' |
| 14 | |
| 15 | function App() { |
| 16 | const rerender = React.useReducer(() => ({}), {})[1] |
| 17 | |
| 18 | const columns = React.useMemo<ColumnDef<Person>[]>( |
| 19 | () => [ |
| 20 | { |
| 21 | header: 'Name', |
| 22 | footer: (props) => props.column.id, |
| 23 | columns: [ |
| 24 | { |
| 25 | accessorKey: 'firstName', |
| 26 | cell: (info) => info.getValue(), |
| 27 | footer: (props) => props.column.id, |
| 28 | }, |
| 29 | { |
| 30 | accessorFn: (row) => row.lastName, |
| 31 | id: 'lastName', |
| 32 | cell: (info) => info.getValue(), |
| 33 | header: () => <span>Last Name</span>, |
| 34 | footer: (props) => props.column.id, |
| 35 | }, |
| 36 | ], |
| 37 | }, |
| 38 | { |
| 39 | header: 'Info', |
| 40 | footer: (props) => props.column.id, |
| 41 | columns: [ |
| 42 | { |
| 43 | accessorKey: 'age', |
| 44 | header: () => 'Age', |
| 45 | footer: (props) => props.column.id, |
| 46 | }, |
| 47 | { |
| 48 | accessorKey: 'visits', |
| 49 | header: () => <span>Visits</span>, |
| 50 | footer: (props) => props.column.id, |
| 51 | }, |
| 52 | { |
| 53 | accessorKey: 'status', |
| 54 | header: 'Status', |
| 55 | footer: (props) => props.column.id, |
| 56 | }, |
| 57 | { |
| 58 | accessorKey: 'progress', |
| 59 | header: 'Profile Progress', |
| 60 | footer: (props) => props.column.id, |
| 61 | }, |
| 62 | ], |
| 63 | }, |
| 64 | ], |
| 65 | [], |
| 66 | ) |
| 67 | |
| 68 | const [data, setData] = React.useState(() => makeData(100000)) |
| 69 | const refreshData = () => setData(() => makeData(100000)) |
| 70 | |
| 71 | const [pagination, setPagination] = React.useState<PaginationState>({ |
| 72 | pageIndex: 0, |
nothing calls this directly
no test coverage detected