Answer the question
In order to leave comments, you need to log in
How to cancel all requests in axios except the last one?
Good afternoon. There is a vue component for autocompletion. On each click, a query string is sent to the server. Accordingly, a situation arises when there are many requests to the server at the same time, although, in fact, only the last one is needed. How can this be implemented?
Answer the question
In order to leave comments, you need to log in
call the method not by keyup or similar events, but by submit, for example
debounce in the lodash package will help you :) https://lodash.com/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question