Skip to content
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

TypeaheadSelect: onClickOutside is not working correctly when there is more than one select component #195

Open
gulcinuras opened this issue Apr 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@gulcinuras
Copy link
Contributor

  • Suppose there is more than one TypeaheadSelect with selected tags. When a tag is removed from the first Typeahead select while the menu of the other TypeaheadSelect component is open, the event does not trigger to close the menu of the other one.
Screen.Recording.2022-04-07.at.21.16.57.mov
@jamcry jamcry added the bug Something isn't working label Jan 15, 2024
@jamcry
Copy link
Collaborator

jamcry commented May 29, 2024

Hello after 2 years 😄
I recently had a similar issue. In my case the problem was that I was using event.stopPropagation() on the parent element of the dropdown menu.
Since event.stopPropagation() prevents emitting the click event, useOnClickOutside() was not being triggered.

If we are using stopPropagation or similar function in typeahead select, it can be the reason.
The similar issue exists in the lists with dropdown menus. I highly suspect that this is related to event.stopPropagation in the list items there.
Screenshot 2024-05-29 at 20 12 06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants