()
| 26 | } |
| 27 | |
| 28 | function App() { |
| 29 | const rerender = React.useReducer(() => ({}), {})[1] |
| 30 | |
| 31 | const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>( |
| 32 | [] |
| 33 | ) |
| 34 | |
| 35 | const columns = React.useMemo<ColumnDef<Person, any>[]>( |
| 36 | () => [ |
| 37 | { |
| 38 | accessorKey: 'firstName', |
| 39 | cell: info => info.getValue(), |
| 40 | }, |
| 41 | { |
| 42 | accessorFn: row => row.lastName, |
| 43 | id: 'lastName', |
| 44 | cell: info => info.getValue(), |
| 45 | header: () => <span>Last Name</span>, |
| 46 | }, |
| 47 | { |
| 48 | accessorFn: row => `${row.firstName} ${row.lastName}`, |
| 49 | id: 'fullName', |
| 50 | header: 'Full Name', |
| 51 | cell: info => info.getValue(), |
| 52 | }, |
| 53 | { |
| 54 | accessorKey: 'age', |
| 55 | header: () => 'Age', |
| 56 | meta: { |
| 57 | filterVariant: 'range', |
| 58 | }, |
| 59 | }, |
| 60 | { |
| 61 | accessorKey: 'visits', |
| 62 | header: () => <span>Visits</span>, |
| 63 | meta: { |
| 64 | filterVariant: 'range', |
| 65 | }, |
| 66 | }, |
| 67 | { |
| 68 | accessorKey: 'status', |
| 69 | header: 'Status', |
| 70 | meta: { |
| 71 | filterVariant: 'select', |
| 72 | }, |
| 73 | }, |
| 74 | { |
| 75 | accessorKey: 'progress', |
| 76 | header: 'Profile Progress', |
| 77 | meta: { |
| 78 | filterVariant: 'range', |
| 79 | }, |
| 80 | }, |
| 81 | ], |
| 82 | [] |
| 83 | ) |
| 84 | |
| 85 | const [data, setData] = React.useState<Person[]>(() => makeData(5_000)) |
nothing calls this directly
no test coverage detected