Clicking the "ClearIndicator" triggers outsideClick hook #5701
LucasNovaes2016
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I ran into a possible issue with react-select (currently using the latest version 5.7.3, but it also happens in previous versions).
I have a situation in which I need to do something when the user clicks outside a div (and the react-select component is inside that div). Therefore, clicking inside the react-select component should not trigger the "outside click". And that's working fine, EXCEPT when I click the clearIndicator (the x button at the end of the input). I don't understand why this is happening and it's causing the logic I programmed for the click-outside event to be called in a situation where it shouldn't.
Some things to keep in mind:
I made this illustrative screenshot below: any click inside the green div should be considered a click inside, including clicking anywhere in the react-select. Only clicks outside the green div should be considered "clicks outside". But currently, clicking specifically on the clearIndicator is considered a click outside the green div. The problem doesn't happen when I click on any other part of react-select
Could anyone try doing something similar and see if the same issue occurs?
Beta Was this translation helpful? Give feedback.
All reactions