-
Notifications
You must be signed in to change notification settings - Fork 326
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
Question: Why is onSuggestSelect fired when there's no user input? #373
Comments
@ro-ka Also came here to report this bug. The way I see it show up so much more often is you backspace or delete your typed query, you'll notice the call to @tstirrat15 Thanks for creating this issue! |
I've recently encountered the same issue. @oyeanuj @tstirrat15 have you been able to resolve this issue? |
@danawhite by checking that the desired properties are present in the suggestion in the callback for |
@danawhite Same as @tstirrat15 but hoping this can be fixed. |
The code was introduced with PR #350. We need to make sure to keep the intended behaviour. |
My 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 thesuggestion
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:
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.The text was updated successfully, but these errors were encountered: