corejavascript / typeahead.js

typeahead.js is a fast and fully-featured autocomplete library
https://typeahead.js.org/
MIT License
967 stars 231 forks source link

Add way to include total number of results (ignoring limit) #198

Open isaacniebeling opened 5 years ago

isaacniebeling commented 5 years ago

It would be nice to be able to add the number of total results available; in our case, hitting Enter will do a complete search, but we only show the top 10 results in typeahead. If there are 25 results, we'd like to be able to say, in the footer template, for example, "25 results available; press enter to see all" (or whatever other configurable text we'd like). Right now, there doesn't even appear to be a way to see how many total suggestions there were.

Chealer commented 3 years ago

This is a good idea, and I would go further and say I for one would appreciate the ability to open a full list in a larger widget (like a Twitter Bootstrap modal).

But it may be a good start/compromise to start by lazy loading results, as @vikashgoyal requested in ticket #1556 of Twitter's Typeahead.js.