react-autosuggest
react-autosuggest copied to clipboard
When clicking custom elements added to the suggestions or suggestions container, suggestion's container won't close
When clicking custom elements added to the suggestions or suggestions container, suggestion's container won't close.
For example: If I want to add a copy to search bar arrow to the suggestions elements (kind of how youtube's mobile app suggestions have). When clicking the arrow, and copying the suggestion value to the search input, there is no way to close the suggestions dropdown even if you click outside of it.
Codepen: https://codepen.io/anon/pen/LzwZzq
Steps to reproduce:
- Focus on the input field.
- Type c, wait for suggestions to appear.
- Click the 'click here to say hello' link.
- Click outside suggestion's input/container, see that it won't close.
Observed behaviour: Suggestions stay open
Expected behaviour: Suggestions should be closed
Same happens with custom elements you add to the renderSuggestionsContainer.
I'm having the same issue. I tried removing alwaysRenderSuggestions: true, but it doesn't seem to have an effect.
i have same issue. but i had solve this to use "data-*" (i think isn't best way...)
here is my solve. https://codepen.io/anon/pen/MOdzbM
@GenesisSam If you add alwaysRenderSuggestions={true}
on your codepen the issue will happens.
This is the result after add this property and select a option:
Any status on this? This issue still remains as of today with version 10.0.2