You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pr is trying to fix issue #110. The idea is to fetch data on focus if minLength is 0.
The proposed solution in the issue was not working if the user select one suggestion doing click.
because my resultsShown is based on HTML rather than the amount of actual results. If I may ask, how do you handle this. For example,
In other words, how do you handle searches where @results.present? equals false?
@results = product.search(params["q"])
The code below generates an error because autocomplete.js cannot find the box when there is an HTML response but @results.present? is false
I have to admit that I don't think I understand the question 😬
But the idea would be not to answer an empty result. What we do is that if the user has not yet entered any text what the search api responds is a few random suggestions. Anyway, this is more of an implementation issue and has little to do with functionality, IMO. Let me know if I can help you 🙂.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr is trying to fix issue #110. The idea is to fetch data on focus if
minLengthis 0.The proposed solution in the issue was not working if the user select one suggestion doing click.