use-on-click-outside
v0.0.4arrow_drop_downv0.0.4
v0.0.3
v0.0.2
v0.0.1
STATUS
Passing
DOWNLOADS
98
VISIBILITY
Public
PUBLISHED
4 years ago
SIZE
3 KB
Check's all click events and invokes the handler when a click that originated
outside of the ref's container is found
1 contributor
Like
Install use-on-click-outside as a package?
Copied
npm i @bit/ach5910.mefrontend.utils.use-on-click-outside
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
chevron_left
chevron_right
utils/useOnClickOutside (
ref:
{current: Node}
,handler:
) : Function
Function
Check’s all click events and invokes the handler when a click that originated outside of the ref’s container is found
Arguments
ref:
{current: Node}
handler:
Function
Returns
Function
Wrapped function that will remove the click listener when invoked