adding trigger to search input causes delay trigger to be ignored
adding trigger to search input causes delay trigger to be ignored
so I'm trying to add a feature and running into a bit of a hiccup.
Within the search field, I'm trying to add an icon, that when clicked, clears the search field - http://puu.sh/g45Wr/b064568803.png
Feature wise, it's working. I bound an event to the icon that clears the datatables search, then redraws the table.
I also bound an event to keyup of the search input itself, so that when you start typing, the X appears, however if you clear the search, the X disappers. This is where things go weird.
$('#table_researchList_filter input').on('keyup', function() { //keyup(function(){
if ($(this).val() == '') {
TantorBookquest.dom.button_clearSearch.hide();
} else {
TantorBookquest.dom.button_clearSearch.show();
}
});
really simple bind, however if this bind is part of the init.dt
event of datatables, then any option for searchDelay
is ingored. If I remove that bind, the searchDelay
works again.
Any idea why binding to the keyup event on the search input causes the delay to be ignored?