-
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
Displaying a "not found" message in the suggestions #353
Comments
Hi, Any update on this? |
You can hook into the onSuggestNoResults. A class on the suggest list would be a good addition to simplify adding a message via CSS. Does the callback help already? |
@ro-ka I'm aware of the event handle, but that only helps for actions/displays outside of the geosuggest - I was thinking of something that's able to leverage the code and styling already in place to display something in the dropdown. Reimplementing a dropdown to use that hook seems kludgy. I'm imagining something like a |
Would a class on the suggest list be enough to style it? Could add text via |
Any updates on this? I'd like to echo @tstirrat15 issue. |
@ro-ka the list doesn't render when there are no suggestions, so a |
The list does render, it’s just not visible. Another class |
@ro-ka I don't think your suggested solution actually works well for all cases (and feels hackish), having tried it. I think ideally, like Google Maps, above, you would want the 'No Results' case to be always present incase none of the suggestions match the user's intent. In that case, you'd want that section to be customizable, both in terms of content and interaction. With the I feel like an ideal API would be a parallel to Not to harp on an old thread but this thread is continuing the discussion in #74 (comment) which never really got resolved. Hope the reasoning above for the additional |
Thanks for the feedback! We should add the |
Short description
Above is what happens on google maps when you enter a string that doesn't match a place. There's an event handle exposed for when there are no suggestions returned, but no easy way to provide a "no results found" dropdown result.
I imagine that this could pretty easily be an additional prop. Is there another way to do this that I'm missing?
The text was updated successfully, but these errors were encountered: