@@ -64,6 +64,7 @@ var DataSheet = function (_PureComponent) {
6464 _this . onMouseUp = _this . onMouseUp . bind ( _this ) ;
6565 _this . onMouseOver = _this . onMouseOver . bind ( _this ) ;
6666 _this . onDoubleClick = _this . onDoubleClick . bind ( _this ) ;
67+ _this . onContextMenu = _this . onContextMenu . bind ( _this ) ;
6768 _this . handleKey = _this . handleKey . bind ( _this ) ;
6869 _this . handleCopy = _this . handleCopy . bind ( _this ) ;
6970 _this . handlePaste = _this . handlePaste . bind ( _this ) ;
@@ -264,6 +265,14 @@ var DataSheet = function (_PureComponent) {
264265 }
265266 }
266267 }
268+ } , {
269+ key : 'onContextMenu' ,
270+ value : function onContextMenu ( evt , i , j ) {
271+ var cell = this . props . data [ i ] [ j ] ;
272+ if ( this . props . onContextMenu ) {
273+ this . props . onContextMenu ( evt , cell , i , j ) ;
274+ }
275+ }
267276 } , {
268277 key : 'onDoubleClick' ,
269278 value : function onDoubleClick ( i , j ) {
@@ -365,6 +374,7 @@ var DataSheet = function (_PureComponent) {
365374 onMouseDown : cell . disableEvents ? nullFtn : _this4 . onMouseDown ,
366375 onDoubleClick : cell . disableEvents ? nullFtn : _this4 . onDoubleClick ,
367376 onMouseOver : cell . disableEvents ? nullFtn : _this4 . onMouseOver ,
377+ onContextMenu : cell . disableEvents ? nullFtn : _this4 . onContextMenu ,
368378 editing : isEditing ( i , j ) ,
369379 colSpan : cell . colSpan ,
370380 value : valueRenderer ( cell )
@@ -401,6 +411,7 @@ DataSheet.propTypes = {
401411 data : _react . PropTypes . array . isRequired ,
402412 className : _react . PropTypes . string ,
403413 onChange : _react . PropTypes . func ,
414+ onContextMenu : _react . PropTypes . func ,
404415 valueRenderer : _react . PropTypes . func . isRequired ,
405416 dataRenderer : _react . PropTypes . func
406417} ;
0 commit comments