Cannot reinitialise DataTable. How to fix it?

Cannot reinitialise DataTable. How to fix it?

quevon24quevon24 Posts: 4Questions: 2Answers: 0

Hi, I hope you can help me, I´m starting to use datatables but I have some problems, If I initialize my data table this way works great:

$('#supply_list_dt').DataTable();

But if I pass some extra options like this:

$('#supply_list_dt').DataTable({
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});

Displays the error: DataTables warning: table id=supply_list_dt - Cannot reinitialise DataTable.

How can I fix it?

This question has an accepted answers - jump to answer

Answers

This discussion has been closed.