I finally got things set up and working the way i want but the export option exports every row even when I have selected individual rows. Here is my code:
$(document).ready(function() {
var dataTable = $('#cases').DataTable( {
dom: 'B<"clear">lfrt<"bottom"ip>',
colReorder: true,
stateSave: true,
select: {
style: 'multi',
},
buttons: [
{
text: 'Add New Case',
action: function ( e, dt, node, config ) {
window.location = '/add-a-case/';
}
},
'colvis',
'selectAll',
'selectNone',
{ extend: 'collection',
text: 'Export',
buttons: ['copy', 'csv', 'excel', 'pdf', 'print']
}
]
} );
} );
Can you please take a look and tell me what I am missing. Thank you all so much!