-
For clarification: I'm talking about the autocomplete widget, not Autocomplete.js. Hi there, I have successfully made an autocomplete search UI by trying to emulate the autocomplete in the showcase. I want to allow the user to load more results if they hit the bottom of the results. I'm not seeing a showMore or hitsPerPage or something like that on autocomplete. I'm not sure how I would go about loading more results. I looked into using Autocomplete.js but I don't think it's exactly what I want. Any ideas or options here? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hmm okay I was able to sort of fix this, but it's a little weird. For anyone who wants to do something similar, you can use |
Beta Was this translation helpful? Give feedback.
-
For showMore, you likely want to change hits for infiniteHits, and can use its refine function to show more items. Although I'd recommend for using a full search page as destination after an autocomplete, as you have much more place, also for filters etc. |
Beta Was this translation helpful? Give feedback.
-
@Haroenv is there a way to do that with the autocomplete widget? https://www.algolia.com/doc/api-reference/widgets/autocomplete/js/ this is the guide I followed and it has some custom render code. Is there a way to forward the autocomplete results to another widget? For some background, I'm making an app that prices various products. The autocomplete is a dropdown to search for products, if clicked on they will be inserted into a table. So a full search page is a little weird for that I feel. |
Beta Was this translation helpful? Give feedback.
Hmm okay I was able to sort of fix this, but it's a little weird. For anyone who wants to do something similar, you can use
configure
. I made a variable to store that and added it to my search widgets. I added ahitsPerPage
variable, then I increment it by 10 if a user gets to the end of the results, then I remove the configure widget and add a new one using the new hitsPerPage value. A little weird, but it works.