We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The reproduction link is below
https://codesandbox.io/s/useclickaway-bug-vmhrz7
Possible solution: use event.currentTarget instead of event.target in the implementation of hook
event.currentTarget
event.target
The text was updated successfully, but these errors were encountered:
It's a bug, thank you for your feedback.
Sorry, something went wrong.
hey @liuyib , what do you think about the below method
event.composedPath().includes(clickawayInputRef.current)
it will work even if the children which are clicked are removed from dom because of business logic.
hey @liuyib , what do you think about the below method event.composedPath().includes(clickawayInputRef.current) it will work even if the children which are clicked are removed from dom because of business logic.
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.
liuyib
Successfully merging a pull request may close this issue.
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: