AJAX Search box queries twice
AJAX Search box queries twice
So when I type in the search box, the datatable draws on the very first letter instead of waiting. I finishing typing my search and the wait finished, but the table draws again.
I'm loading from the server.
How do I reduce it to one draw instead of two? I was thinking about going into the search event and code in something where if the search box contains less than two characters, do not search.
DataTables 1.10.12
var DataTableOptionsPaged = {
deferRender: true,
dom: 'irtlp',
fixedHeader: true,
searchDelay: 5000,
serverSide: true,
stateSave: true,
pageLength: 100,
paging: true,
processing: true
};
This question has an accepted answers - jump to answer
Answers
I fixed this by removing the default event handler and put on my own.
http://live.datatables.net/cixegedi/1/edit