Hello
I am trying to make a search box in our appilcation, something like google really.
When our users type something i want them to see some suggestions or autocompletes, so when they select one of the suggestions it shows the correct record.
However i also want an option where the user doesn’t select one of the suggestions and then i want to show all of the results for this search query in a list.
I made a type ahead field in which users can type their “query”, the type ahead then sends a rest call to my search engine. The search engine sends its best results back to the application.
The top 5 results then appear in the suggestion box of the type ahead. (they are in the valueList of the typeahead).
However the type ahead automatically selects the first one, i would like to give the users the ability to press enter (when nothing is selected) so that a list appears which contains all of the results (not just top 5).
If the user does select a suggestion it should open the selected record. Otherwise a list with all the results, from which the user can select the correct record(s).
The results of my search engine contains the id which is used in the database.
So my question is can i use type ahead that doesn’t automatically select one its values, so that when you press enter it can execute another method(to call my search engine for all the results), and storing them in a listbox.