Skip to content

Commit 127dd9b

Browse files
committed
feat(table): pass full row to parents of row groups
affects: @crave/farmblocks-table including the array with the sub rows objects ISSUES CLOSED: #496
1 parent 734f058 commit 127dd9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/table/src/Table.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class Table extends React.Component {
195195

196196
_renderRowGroup = (row, index) => {
197197
const { rowGroupKey, flatGroupCondition } = this.props;
198-
const { [rowGroupKey]: childRows, ...parentRow } = row;
198+
const { [rowGroupKey]: childRows } = row;
199199
const shouldUngroup = !!(flatGroupCondition && flatGroupCondition(row));
200200
const rowKey = getRowKey(index, "");
201201

@@ -206,7 +206,7 @@ class Table extends React.Component {
206206

207207
return (
208208
<tbody className={`body ${!expanded ? "collapsed" : ""}`} key={index}>
209-
{!shouldUngroup && this._renderRow(parentRow, index, "", true)}
209+
{!shouldUngroup && this._renderRow(row, index, "", true)}
210210
{childRows.map((row, subindex) =>
211211
this._renderRow(row, index, subindex, false, shouldUngroup)
212212
)}

0 commit comments

Comments
 (0)