Scenario using Angular Datatables
In my previous experience with jQuery
, I was able to accomplish the functionality shown in the images below:
https://i.sstatic.net/VoT2A.png
Each Tab displayed a datatable, with the count of filtered records shown next to the tab name. The datatable itself displayed the filtered data as demonstrated here:
https://i.sstatic.net/DtOTR.png
To achieve this in jQuery
, I utilized the fnInfoCallback
callback during the initialization of my datatable.
$('#mydatatable').dataTable({
sDom: "<'row'<'col-sm-6'l><'col-sm-6'f>r>t<'row'<'col-sm-6'i><'col-sm-6'p>>",
"processing": true,
"serverSide": true,
...
});
This allowed me to access the recordsFiltered
field in the server's datatable response.
// Datatable Response from server
{
"draw": "2",
"recordsTotal": "824",
"recordsFiltered": "82",
"data": [
]
}
Challenge Encountered
I am currently utilizing the Angular Datatables library in my Angular 8 application. Here is the link to the library: .
However, I am unsure how to replicate the same functionality using Angular Datatables. Despite searching through their examples, I have not been able to find anything related to such callback operations. Can you provide guidance on how I can achieve this?