How to refresh data in the dataTable after re-initialized?
How to refresh data in the dataTable after re-initialized?

I used livewire hooks in my scripts, when I hook (re-initialized DataTable) the data in the dataTable is not refresh.
let table = new DataTable('#permissionTable');
Livewire.hook('element.updated', (fromEl, toEl, component) => {
$("#permissionTable").dataTable().fnDestroy()
$('#permissionTable').DataTable({
"deferRender": true,
stateSave: true
});
})
This discussion has been closed.