Skip to content

Commit da0fb69

Browse files
authored
Merge pull request #497 from CraveFood/table-parent-row
feat(table): pass full row to parents of row groups
2 parents 734f058 + 127dd9b commit da0fb69

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)