Jquery Data table issue when giving length change true

时间:2017-07-12 08:20:03

标签: jquery datatables

When I call my function for the first time the jquery functions is working properly, but if I call the same function once again without refrshing the page the data table functions are not working.

If I change the length to false it is working perfectly.

table = $('#contenttableTemplate').DataTable({
  "retrieve": true,
  "paging": true,
  "responsive": true,
  "fixedHeader": true,
  "lengthChange": true,
  "lengthMenu": [
    [5, 10, 25, 50, -1],
    [5, 10, 25, 50, "All"]
  ],
  "pageLength": 5,
  "order": [
    [5, "desc"]
  ],
  "columnDefs": [{
    "orderable": false,
    "targets": 0
  }],
  "deferRender": true,
  "scrollX": true,
});

0 个答案:

没有答案