Typeahead : late update of typeahead-no-results variable
Author: alexis-allotCreated Jul 16, 2016Updated Nov 28, 2018
Labelstype: enhancementcomponent: typeaheadPRs plz!
Bug description:
The typeahead-no-results variable is true while typing a string that will have autocomplete results, which is confusing to the user.
Example :
I am using typeahead-wait-ms to set a waiting period of 500ms
- I enter the string "z" (that will return no hits). The typeahead waits 500ms, then runs the query, then the variable typeahead-no-results is set to true and my custom message is shown to the user.
- The user deletes the string "z". typeahead-no-results is still true, and my message is still shown.
- The user enters the string "a" (that will produce hits). During the 500ms waiting my not-found message is still shown as typeahead-no-results is still true.
- Only when the request to the server is started typeahead-no-results becomes false and my message is hidden
Maybe typeahead-no-results should be reset on every keyup ?
Source: angular-ui/bootstrap