I'm reloading my table using a dropdown with a year selection. The first time in the RowGroup expand and collapse function works. When I reload the table, that functionality is disable. Any thoughts.
The RowGroup expand and collapse function
// Expand/Collaspe Groups
$('#timeLogTable_OutOfOffice tbody').on('click', 'tr.dtrg-start', function () {
var pos = $('div.dataTables_scrollBody').scrollTop();
//console.log(pos)
var name = $(this).data('name');
collapsedGroups[name] = !collapsedGroups[name];
table.draw('page');
});
The DataTable().clear().destroy(); function
function reloadOutOfOficeTable(){
$("#timeLogTable_OutOfOffice").DataTable().off( 'select deselect');
$("#timeLogTable_OutOfOffice").DataTable().clear().destroy();
loadTable()
}