Skip to content

Commit 6ca1131

Browse files
committed
feat: add "onContextMenu" prop
1 parent e34e535 commit 6ca1131

4 files changed

Lines changed: 5 additions & 0 deletions

File tree

Libraries/Components/Touchable/TouchableOpacity.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@ var TouchableOpacity = createReactClass({
262262
onMouseMove={this.props.onMouseMove}
263263
onMouseOver={this.props.onMouseOver}
264264
onMouseOut={this.props.onMouseOut}
265+
onContextMenu={this.props.onContextMenu}
265266
onContextMenuItemClick={this.props.onContextMenuItemClick}
266267
contextMenu={this.props.contextMenu}>
267268
{this.props.children}

Libraries/Components/Touchable/TouchableWithoutFeedback.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ const TouchableWithoutFeedback = createReactClass({
113113
onMouseMove: PropTypes.func,
114114
onMouseOver: PropTypes.func,
115115
onMouseOut: PropTypes.func,
116+
onContextMenu: PropTypes.func,
116117
onContextMenuItemClick: PropTypes.func,
117118
contextMenu: PropTypes.array,
118119
},
@@ -217,6 +218,7 @@ const TouchableWithoutFeedback = createReactClass({
217218
onMouseMove: this.props.onMouseMove,
218219
onMouseOver: this.props.onMouseOver,
219220
onMouseOut: this.props.onMouseOut,
221+
onContextMenu: this.props.onContextMenu,
220222
onContextMenuItemClick: this.props.onContextMenuItemClick,
221223
contextMenu: this.props.contextMenu,
222224
style,

Libraries/Components/View/ReactNativeViewAttributes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ ReactNativeViewAttributes.UIView = {
3333
onMouseMove: true,
3434
onMouseOver: true,
3535
onMouseOut: true,
36+
onContextMenu: true,
3637
onAccessibilityTap: true,
3738
onMagicTap: true,
3839
collapsable: true,

Libraries/Components/View/ViewPropTypes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ module.exports = {
439439
onDragEnter: PropTypes.func,
440440
onDragLeave: PropTypes.func,
441441
onDrop: PropTypes.func,
442+
onContextMenu: PropTypes.func,
442443
onContextMenuItemClick: PropTypes.func,
443444
/**
444445
* Mapped to toolTip property of NSView. Used to show extra information when

0 commit comments

Comments
 (0)