MCPcopy Index your code
hub / github.com/TanStack/table / expandRows

Function expandRows

packages/table-core/src/utils/getExpandedRowModel.ts:33–51  ·  view source on GitHub ↗
(rowModel: RowModel<TData>)

Source from the content-addressed store, hash-verified

31}
32
33export function expandRows<TData extends RowData>(rowModel: RowModel<TData>) {
34 const expandedRows: Row<TData>[] = []
35
36 const handleRow = (row: Row<TData>) => {
37 expandedRows.push(row)
38
39 if (row.subRows?.length && row.getIsExpanded()) {
40 row.subRows.forEach(handleRow)
41 }
42 }
43
44 rowModel.rows.forEach(handleRow)
45
46 return {
47 rows: expandedRows,
48 flatRows: rowModel.flatRows,
49 rowsById: rowModel.rowsById,
50 }
51}

Callers 2

getPaginationRowModelFunction · 0.90
getExpandedRowModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…