From 118efbe00ec97cb0cc395d80fae2beb069ad3989 Mon Sep 17 00:00:00 2001 From: MaronMariusz Date: Thu, 21 Jan 2016 13:25:36 +0100 Subject: [PATCH] [Table] Send event object after click, hover, hoverOut on cell. modified: src/table/table-body.jsx modified: src/table/table.jsx --- src/table/table-body.jsx | 22 +++++++++++----------- src/table/table.jsx | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/table/table-body.jsx b/src/table/table-body.jsx index 07ca369e5016e5..98fac0cf0919a4 100644 --- a/src/table/table-body.jsx +++ b/src/table/table-body.jsx @@ -382,26 +382,26 @@ const TableBody = React.createClass({ return rows.sort(); }, - _onCellClick(e, rowNumber, columnNumber) { - e.stopPropagation(); - if (this.props.onCellClick) this.props.onCellClick(rowNumber, this._getColumnId(columnNumber)); + _onCellClick(event, rowNumber, columnNumber) { + event.stopPropagation(); + if (this.props.onCellClick) this.props.onCellClick(rowNumber, this._getColumnId(columnNumber), event); }, - _onCellHover(e, rowNumber, columnNumber) { - if (this.props.onCellHover) this.props.onCellHover(rowNumber, this._getColumnId(columnNumber)); - this._onRowHover(e, rowNumber); + _onCellHover(event, rowNumber, columnNumber) { + if (this.props.onCellHover) this.props.onCellHover(rowNumber, this._getColumnId(columnNumber), event); + this._onRowHover(event, rowNumber); }, - _onCellHoverExit(e, rowNumber, columnNumber) { - if (this.props.onCellHoverExit) this.props.onCellHoverExit(rowNumber, this._getColumnId(columnNumber)); - this._onRowHoverExit(e, rowNumber); + _onCellHoverExit(event, rowNumber, columnNumber) { + if (this.props.onCellHoverExit) this.props.onCellHoverExit(rowNumber, this._getColumnId(columnNumber), event); + this._onRowHoverExit(event, rowNumber); }, - _onRowHover(e, rowNumber) { + _onRowHover(event, rowNumber) { if (this.props.onRowHover) this.props.onRowHover(rowNumber); }, - _onRowHoverExit(e, rowNumber) { + _onRowHoverExit(event, rowNumber) { if (this.props.onRowHoverExit) this.props.onRowHoverExit(rowNumber); }, diff --git a/src/table/table.jsx b/src/table/table.jsx index 22a49acea2ba68..0863e87614e18e 100644 --- a/src/table/table.jsx +++ b/src/table/table.jsx @@ -231,16 +231,16 @@ const Table = React.createClass({ return base; }, - _onCellClick(rowNumber, columnNumber) { - if (this.props.onCellClick) this.props.onCellClick(rowNumber, columnNumber); + _onCellClick(rowNumber, columnNumber, event) { + if (this.props.onCellClick) this.props.onCellClick(rowNumber, columnNumber, event); }, - _onCellHover(rowNumber, columnNumber) { - if (this.props.onCellHover) this.props.onCellHover(rowNumber, columnNumber); + _onCellHover(rowNumber, columnNumber, event) { + if (this.props.onCellHover) this.props.onCellHover(rowNumber, columnNumber, event); }, - _onCellHoverExit(rowNumber, columnNumber) { - if (this.props.onCellHoverExit) this.props.onCellHoverExit(rowNumber, columnNumber); + _onCellHoverExit(rowNumber, columnNumber, event) { + if (this.props.onCellHoverExit) this.props.onCellHoverExit(rowNumber, columnNumber, event); }, _onRowHover(rowNumber) {