-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useClickAway works wrong #2321
Comments
It's a bug, thank you for your feedback. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
hey @liuyib , what do you think about the below method
|
I think that it would be better to add a parameter to control this behavior. Maybe someone need:
Maybe also someone need the opposite action. |
The reproduction link is below
https://codesandbox.io/s/useclickaway-bug-vmhrz7
Possible solution:
use
event.currentTarget
instead ofevent.target
in the implementation of hookThe text was updated successfully, but these errors were encountered: