typeahead.js icon indicating copy to clipboard operation
typeahead.js copied to clipboard

Feature Request: Add Delay to typeahead when using an AJAX datasource.

Open amyth91 opened this issue 12 years ago • 2 comments

Is it possible to add a delay to the source ajax call when using ajax json data source, currently it makes calls for every letter that is typed causing multiple server requests which takes long time to return data and because the 'requested word' has changed as the user types, the results returned are not correct sometimes.

(Not sure if this request was made earlier, sorry if this is a duplicate one)

Thanks

amyth91 avatar Jun 30 '14 03:06 amyth91

This "delay" already exists in bloodhound. See rateLimitBy. If you're wondering if this functionality can be duplicated in the typeahead component, the answer no as IMO this functionality belongs on the data component, not the UI component.

jharding avatar Jul 08 '14 23:07 jharding

First request returns data in 1 sec, second request 1.4 sec likewise 1.6,1.9,1.1,0.8...so on. How do you make the customer expect the results at a constant time ? if you don't have a delay function in the UI component. JMO.

i44 avatar Sep 19 '18 15:09 i44