( handler: (...args: [React.MouseEvent, ...any[]]) => any, args: [React.MouseEvent, ...any[]], relatedNative: 'fromElement' | 'toElement', )
| 55 | // for cases when the trigger is disabled and mouseOut/Over can cause flicker |
| 56 | // moving from one child element to another. |
| 57 | function handleMouseOverOut( |
| 58 | handler: (...args: [React.MouseEvent, ...any[]]) => any, |
| 59 | args: [React.MouseEvent, ...any[]], |
| 60 | relatedNative: 'fromElement' | 'toElement', |
| 61 | ) { |
| 62 | const [e] = args; |
| 63 | const target = e.currentTarget; |
| 64 | const related = e.relatedTarget || e.nativeEvent[relatedNative]; |
| 65 | |
| 66 | if ((!related || related !== target) && !contains(target, related)) { |
| 67 | handler(...args); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | const triggerType = PropTypes.oneOf<OverlayTriggerType>([ |
| 72 | 'click', |
no test coverage detected
searching dependent graphs…