Skip to content

Commit

Permalink
Merge pull request #3492 from ccomb/table-row-events
Browse files Browse the repository at this point in the history
[TableRow] [TableRowColumn] Propagate events
  • Loading branch information
alitaheri committed Mar 3, 2016
2 parents 42c5aa5 + 65e81ce commit b9bb7b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/table/table-body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const TableBody = React.createClass({
children.push(child);
});

return React.cloneElement(child, {...props, ...handlers}, children);
return React.cloneElement(child, {...props, ...handlers, ...child.props}, children);
}
});
},
Expand Down
4 changes: 2 additions & 2 deletions src/table/table-row.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,15 @@ const TableRow = React.createClass({

const rowColumns = React.Children.map(this.props.children, (child, columnNumber) => {
if (React.isValidElement(child)) {
return React.cloneElement(child, {
return React.cloneElement(child, {...{
columnNumber: columnNumber,
hoverable: this.props.hoverable,
key: child.props.key || `${this.props.rowNumber}-${columnNumber}`,
onClick: this._onCellClick,
onHover: this._onCellHover,
onHoverExit: this._onCellHoverExit,
style: Object.assign({}, styles.cell, child.props.style),
});
}, ...child.props});
}
});

Expand Down

0 comments on commit b9bb7b0

Please sign in to comment.