MCPcopy Create free account
hub / github.com/Autodesk/react-base-table / generateData

Function generateData

website/src/utils/baseScope.js:30–42  ·  view source on GitHub ↗
(columns, count = 200, prefix = 'row-')

Source from the content-addressed store, hash-verified

28 }))
29
30const generateData = (columns, count = 200, prefix = 'row-') =>
31 new Array(count).fill(0).map((row, rowIndex) => {
32 return columns.reduce(
33 (rowData, column, columnIndex) => {
34 rowData[column.dataKey] = `Row ${rowIndex} - Col ${columnIndex}`
35 return rowData
36 },
37 {
38 id: `${prefix}${rowIndex}`,
39 parentId: null,
40 }
41 )
42 })
43
44const noop = () => {}
45const delay = ms => new Promise(resolve => setTimeout(resolve, ms))

Callers 15

components.jsFile · 0.85
frozen-rows.jsFile · 0.85
hide-header.jsFile · 0.85
column-hovering.jsFile · 0.85
multi-sort.jsFile · 0.85
disabled.jsFile · 0.85
tooltip-cell.jsFile · 0.85
footer-renderer.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected