useOnOutsideClick Function
Deprecated in 4.15.0. Used internally.
Invokes onOutsideClick handler when user clicks outside of referenced element.
useOnOutsideClick<T extends Element>(onOutsideClick?: () => void, outsideEventPredicate?: (e: OutsideClickEvent) => boolean): React.RefObject<T>
Parameter | Type | Description |
---|---|---|
onOutsideClick | () => void | |
outsideEventPredicate | (e: OutsideClickEvent) => boolean | Invoked for intermediate events. Return false to prevent outside click. |
Returns - React.RefObject<T>
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.