Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

double datatable turbolinks issue

var dataTable = $('.data-table').DataTable();
document.addEventListener("turbolinks:before-cache", function() {
  if (dataTable !== null) {
   dataTable.destroy();
   dataTable = null;
  }
});
Source by m.phillydevshop.com #
 
PREVIOUS NEXT
Tagged: #double #datatable #turbolinks #issue
ADD COMMENT
Topic
Name
1+4 =