I am using datatables (https://datatables.net/). My tables contain a column with checkboxes. I get which rows are checked by doing the following:
var tu = $('#mytable').dataTable().api();
var rows_selected = tu.column(0).checkboxes.selected();
This works fine until I recreate the table with new data. When I execute the code above I am getting the selected rows from the initial data. I have tried calling destroy() and clear() before I call datatable() again. Ie, I have tried doing:
I am recreating the table by doing the following:
where data contains the html for the table (ie <table><thead> ....</thead><tbody>....</tbody></table>)
Can anyone help me figure out what I need to do to clear the previously selected rows.