The wrapped element.
The mouse event to listen to. You can disable the listener by providing false
.
The mouse event to listen to. You can disable the listener by providing false
.
Callback fired when a “click away” event is detected.
The touch event to listen to. You can disable the listener by providing false
.
Listen for click events that occur somewhere in the document, outside of the element itself. For instance, if you need to hide a menu when people click anywhere else on your page. Demos:
API:
Listen for click events that occur somewhere in the document, outside of the element itself. For instance, if you need to hide a menu when people click anywhere else on your page.
Name | Type | Description |
---|---|---|
children | custom | The wrapped element. |
disableReactTree | bool | The mouse event to listen to. You can disable the listener by providing |
mouseEvent | 'onClick' | 'onMouseDown' | 'onMouseUp' | false | The mouse event to listen to. You can disable the listener by providing |
onClickAway (required) | function | Callback fired when a “click away” event is detected. |
touchEvent | 'onTouchEnd' | 'onTouchStart' | false | The touch event to listen to. You can disable the listener by providing |