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

Function generateColumns

packages/table-core/tests/getGroupedRowModel.test.ts:11–18  ·  view source on GitHub ↗
(people: Person[])

Source from the content-addressed store, hash-verified

9type PersonColumn = ColumnDef<Person, string | number | Person[] | undefined>
10
11function generateColumns(people: Person[]): PersonColumn[] {
12 const columnHelper = createColumnHelper<Person>()
13 const person = people[0]
14 return Object.keys(person).map(key => {
15 const typedKey = key as personKeys
16 return columnHelper.accessor(typedKey, { id: typedKey })
17 })
18}
19
20describe('#getGroupedRowModel', () => {
21 it('groups 50k rows and 3 grouped columns with clustered data in less than 5 seconds', () => {

Callers 1

Calls 1

createColumnHelperFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…