I have an autocomplete form that receives a list, I would like that when I type in the search field every time I insert a letter the previous call is canceled and continues with the new call, I have tried with throttling but nothing to do ... I am using react with mui how could I do?
this is my function:
const myFunction= throttle(350, false, (value) => {
axios.get(url, {
params: {
q: value,
}
})
.then((response) => {
doSomething(response.data);
})
})
I would like to achieve this result
Thank you so much