File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ export default function (target) {
6464
6565 if ( event != null ) customEvents [ event ] = true
6666 if ( eventOff != null ) customEventsOff [ eventOff ] = true
67+ for ( const event of this . state . possibleCustomEvents ) customEvents [ event ] = true
68+ for ( const event of this . state . possibleCustomEventsOff ) customEventsOff [ event ] = true
6769
6870 this . unbindBodyListener ( body )
6971
Original file line number Diff line number Diff line change @@ -51,7 +51,9 @@ class ReactTooltip extends Component {
5151 scrollHide : PropTypes . bool ,
5252 resizeHide : PropTypes . bool ,
5353 wrapper : PropTypes . string ,
54- bodyMode : PropTypes . bool
54+ bodyMode : PropTypes . bool ,
55+ possibleCustomEvents : PropTypes . arrayOf ( PropTypes . string ) ,
56+ possibleCustomEventsOff : PropTypes . arrayOf ( PropTypes . string )
5557 } ;
5658
5759 static defaultProps = {
@@ -85,7 +87,9 @@ class ReactTooltip extends Component {
8587 currentTarget : null , // Current target of mouse event
8688 ariaProps : parseAria ( props ) , // aria- and role attributes
8789 isEmptyTip : false ,
88- disable : false
90+ disable : false ,
91+ possibleCustomEvents : props . possibleCustomEvents || [ ] ,
92+ possibleCustomEventsOff : props . possibleCustomEventsOff || [ ]
8993 }
9094
9195 this . bind ( [
You can’t perform that action at this time.
0 commit comments