useOnOutsideClick Function
Invokes onOutsideClick handler when user clicks outside of referenced element.
useOnOutsideClick<T extends Element<T>>(onOutsideClick?: () => void, outsideEventPredicate?: (e: OutsideClickEvent) => boolean): RefObject<T>
Parameter | Type | Description |
---|---|---|
onOutsideClick | () => void | |
outsideEventPredicate | (e: OutsideClickEvent) => boolean |
Returns - RefObject<T>
Defined in
Last Updated: 20 June, 2023