Search is not working for nested table?
Search is not working for nested table?
AhsanKamal
Posts: 2Questions: 1Answers: 0
var table = $('#tblConcepts').DataTable({
'responsive': true
})
var state = table.state.loaded();
if (state && state.search.search !== '') {
var colSearch = state.search;
if (colSearch.search) {
$('input[type="search"]').val(colSearch.search);
}
table.page(table.page()).draw('page');
}
$('input[type="search"]').on('keyup search input paste cut', function () {
var data = table
.search(this.value)
.draw();
});
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
Answers
I'm using nested table but the main table dose not search the child table
Line 14 is only going to search the
#tblConcepts
table. How are you creating the child table?Please post a link to your page or a test case replicating the issue so we can see what you are doing to offer suggestions.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin