I'm working on Jquery data table. data retrieved via Ajax call and populated to the DataTable. the DataTable is inside a modal. When I type on the search bar, the problem is that the filter is not working. and also when I type anything on the search bar, it clears all table rows and won't get back.
$(document).ready(function(){
$('#table').DataTable({
"searching": true,
});
$.ajax({
type: "POST",
data: {user_id: usr_id},
success: function(result){
$('#table tbody').html(row);
}
});
});