search.dt Event Handler -- Determine the # of Rows in the Results
search.dt Event Handler -- Determine the # of Rows in the Results

I need to disable buttons on the page whenever a search results in 0 rows being shown.
var tbl = $('#myTable').DataTable();
tbl.on('search.dt', function (e,settings) {
consoleLog(tbl.rows().length,'# rows'); // How do I determine the # of rows that resulted from the search?
});
Thanks.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Use the
selector-modifier
of{ search: "applied" }
.Kevin
Thank you!