Search not working
Search not working
aclayton
Posts: 2Questions: 0Answers: 0
var table = $('#job-codes-table').DataTable({
columns: [
{ data: 'code' },
{ data: 'description' }
],
data: jobCodesArr,
select: {
style: 'multi'
},
drawCallback: function (settings) {
console.log('DataTables has redrawn the table');
},
initComplete: function () {
dtComplete($(this));
}
});
table.on('select deselect', function (e, dt, type, items) {
updateSelection(table, 'jobCodesToAdd');
});
$('#code-filter').on('keyup', function () {
table.search( $(this).val() ).draw();
});
very simple case, search not working ... no errors ... can see drawCallback firing after keyup on filter.
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Replies
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
thanks Colin.
http://live.datatables.net/wunibedu/1/edit?html,js,output
not sure what I'm doing wrong for the custom search field not to be working.
It seems to work. If I type
wiper
into your search input it works. Please provide the steps to show the issue you are asking about.Kevin