How to cancel previous AJAX calls in DataTables
How to cancel previous AJAX calls in DataTables
Dear community and moderators!
I know that there are a lot of posts on this forum and on Stackoverflow.
But there are still no clear answer of how it could be possible to cancel currently call.
I will describe my current situation: When I type search text in input field - it could happened that search order would be wrong. And I will receive result without last entered letter. I have set "searchDelay": 1000, but it doesn't help.
This question has an accepted answers - jump to answer
Answers
Hi @plazav,
This thread here may help, the proposed solution helped @JonnyEggins. Can you try that, please, and let us know if it works.
Cheers,
Colin
Thank you, @colin !
I have seeing this. But have no idea where does he has put
This thread has an interesting solution using debounce. Take a look at the last two posts.
Kevin
This js allows to add button and start search only after button click or enter.
Link to demo
I have decided to use it.
@plazav : nice, sorry, I missed your original reply, but that looks like a good solution