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

Function makeDataLevel

examples/react/column-ordering/src/makeData.ts:37–45  ·  view source on GitHub ↗
(depth = 0)

Source from the content-addressed store, hash-verified

35
36export function makeData(...lens: number[]) {
37 const makeDataLevel = (depth = 0): Person[] => {
38 const len = lens[depth]!
39 return range(len).map((d): Person => {
40 return {
41 ...newPerson(),
42 subRows: lens[depth + 1] ? makeDataLevel(depth + 1) : undefined,
43 }
44 })
45 }
46
47 return makeDataLevel()
48}

Callers 1

makeDataFunction · 0.70

Calls 2

rangeFunction · 0.70
newPersonFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…