afcapel / stimulus-autocomplete

Stimulus autocomplete component
MIT License
482 stars 63 forks source link

Feature request : delay option #101

Closed apsylone closed 2 years ago

apsylone commented 2 years ago

Hi,

It would be a great addition IMHO if we could have a delay option. For example : http://easyautocomplete.com/guide#sec-delay

Really useful when the ajax call asked for a lot of ressources to be executed on backend.

afcapel commented 2 years ago

@apsylone there's already a delay. The autocomplete waits until you stop typing for 300ms before sending an request to the server. 300ms is a quite typical value for this kind of delay. Although it's not configurable. But we can make it configurable if there's a case for it.

afcapel commented 2 years ago

PR to make delay configurable https://github.com/afcapel/stimulus-autocomplete/pull/102

apsylone commented 2 years ago

Nice addition. That's exactly what I was looking for :) Thanks @afcapel .