Answers for "double datatable turbolinks issue"

1

double datatable turbolinks issue

var dataTable = $('.data-table').DataTable();
document.addEventListener("turbolinks:before-cache", function() {
  if (dataTable !== null) {
   dataTable.destroy();
   dataTable = null;
  }
});
Posted by: Guest on March-26-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language