Closed mikevinmike closed 6 months ago
BUMP - @aishek, can you please consider merging this?
I can confirm that this resolves my issue with 'lagging' auto-completion when I use rate limiting & cancel queued requests. (Thanks @mikevinmike! ❤️)
// First, cancel in-progress requests as the previous suggestions no longer matter.
this.suggestAddressesCancelTokenSource?.cancel()
this.suggestAddressesCancelTokenSource = axios.CancelToken.source();
// Issue the new request.
return this.http.get(API_URL + '/suggest_addresses', {
params: { query },
cancelToken: this.suggestAddressesCancelTokenSource.token
})
Well, it is better later than never. Thanks!
should resolve issue #21