Result section don't hide after click
See original GitHub issueSo, when I click one of the results, the ‘onPress’ is fired, but the result section don’t hide. This happens only if there is an ‘onPress’ function defined
For example, my onPress had this simple function: console.log(details.geometry.location)
. In this case, results were hidden after click, as expected.
Next time, my function got complicated and it had something like: this.handlePress(details.geometry.location)
. This time, results didn’t hide. I am quite sure handlePress
is not causing any issue, it only has setState
within it. That’s a very simple thing, right? Anything other than console.log keeps the result from hiding. I think it’s a bug
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8
Top Results From Across the Web
javascript - Hide search results when clicked anywhere expect ...
Hide search results when clicked anywhere expect on search results in Jquery ; type · "text" ; id · "MainPageSearchBar" ; placeholder ·...
Read more >Show and hide sections using click or mouse over
How to show and hide sections using click or mouse over in HTML.
Read more >Lesson 5: Using Javascript to Hide and Show Content
It's common practice on today's web to hide content from users until it's needed. In this lesson, you will hide your clock, then...
Read more >Hide or display the Paste Options button - Microsoft Support
This article explains how to show or hide the Paste Options button on a PC. Click the File tab, then click Options. Note:...
Read more >Hide poll results - Slido Community
If you click on the Hide live results checkbox while creating your polls, it will prevent the audience from seeing the results right...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ibrahimsenan’s solution worked for me. Example code:
GooglePlacesAutocomplete automatically takes care of setting listViewDisplayed to true when the user is typing their search terms.
the shouldComponentUpdate function should return false for any set state done in the onPress function
the on press function