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

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

Anonymouse703Anonymouse703 Posts: 18Questions: 8Answers: 0

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
            });

        })
Sign In or Register to comment.