Question: Why is onSuggestSelect fired when there's no user input?
See original GitHub issueMy project uses react-geosuggest for a search bar, and we’ve been seeing a bunch of sentry errors where our onSuggestSelect
function is expecting to find a property on the suggestion
passed to the function but does not find it. It seemed weird that this error is being thrown at all.
I figured out that I can replicate the error by:
- Let the page load
- Enter some text into the searchbar
- Delete that text
- Click out of the searchbar
This code is the source of the issue. I’d call it a bug except that it seems to have been coded this way intentionally - why was that?
I could pretty easily wrap my onSuggestSelect
function with a check to make sure that the suggestion exists, but that seems like a hack.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Why is my program getting terminated when i enter user input?
I think I am not comparing the strings correctly. I tried using compare function but still it did not work. #include <iostream> #include ......
Read more >How to tell if TextChanged fired in response to user input
I am finding that the TextChanged event is firing during databinding, as it should, but this is blowing away the manually overridden calculation ......
Read more >@nrk/core-suggest - npm
@nrk/core-suggest enhances an input, providing keyboard accessible functionality for autocompletion, search results and smart select box ...
Read more >platform/frameworks/base - Git at Google
There - * can be at most one listener per config key. ... "Could not access statsd to inform it of pulling alarm...
Read more >com.google.android.as_1.4.245987093.apk - Hybrid Analysis
Not all malicious and suspicious indicators are displayed. ... initiate a phone call without going through the Dialer user interface for the user...
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
@danawhite by checking that the desired properties are present in the suggestion in the callback for
onSuggestSelect
. It’s hackish but it works…The code was introduced with PR https://github.com/ubilabs/react-geosuggest/pull/350. We need to make sure to keep the intended behaviour.