Autocomplete fires search request prematurely
When I quickly type @hj
(without any pauses, more prompty that I'd normally do), GET /api/v1/accounts/search?q=h&resolve=true
request is fired (notice it's h
not hj
).
GET /api/v1/accounts/search?q=hj&resolve=true
(the correct request in this scenario) is NOT fired, even when I type in more symbols (e.g. typing j
triggers
GET /api/v1/accounts/search?q=hjj&resolve=true
) and then delete typed in characters.
Please ensure that:
-
there's a reasonable timeout on typing (I'd say 500-1000 ms, TBD) before search query is fired.
-
fired queries are stored and compared with the current input once user pauses typing. If
hj
query was never fired and user pauses after adding or deleting some symbols so that the input is@hj
,GET /api/v1/accounts/search?q=hj&resolve=true
should be executed).
I'd also be nice to progressively increase the timeout before firing the next query if user is executing them too fast (e.g. sg
— normal timeout — query — sh
— normal timeout — query — shpu
— increased timeout — query) but could be done separately (TBD with @feld).