You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should call handler as it effectively clicked outside non existent target.
Additional context
For example I have a popup dialog and a menu within this dialog. useOnClickOutside([dialog, menu], closeDialog). If menu not opened, hence menu.current = null, then closeDialod will never fire.
The text was updated successfully, but these errors were encountered:
* Support missing refs (fixes#531)
* Add support for focus event to `useOnClickOutside` (Fixes: #522)
* Expose `AddEventListenerOptions` in `useOnClickOutside` (Fixes#554 from @metav-drimz)
Describe the bug
useOnClickOutside
not callshandler
when one of the references are not assigned.To Reproduce
useOnClickOutside({current: false}, () => console.log('close'))
Expected behavior
It should call handler as it effectively clicked outside non existent target.
Additional context
For example I have a popup dialog and a menu within this dialog.
useOnClickOutside([dialog, menu], closeDialog)
. If menu not opened, hencemenu.current = null
, thencloseDialod
will never fire.The text was updated successfully, but these errors were encountered: