简体   繁体   中英

Datatables remove all rows

I use DataTables and Bootstrap gentelella. Datatables work fine when they have some records. When I open page with empty data in table and go to Create page and go back I see that DataTables do not work ok.

在此处输入图片说明

I use this code for init Datatable:

$('#table-programm-station')
  .DataTable({
    "language": {
      "url": "/js/datatables/Russian.json"
    },
    dom: 'T<"clear">lfrtip',
    tableTools: {
      "sRowSelect": "multi",
      //"aButtons": ["select_all", "select_none"]
    }
  });

If I remove language option it all work fine. Also I at first load language json and successfully parse it then assign it to language option and have the same result.

I don't get any errors in the console. How to fix it?

You can use this cdn '//cdn.datatables.net/plug-ins/1.10.15/i18n/Russian.json' .

It works here

var table = $('#example').DataTable({
   language : {
      url: '//cdn.datatables.net/plug-ins/1.10.15/i18n/Russian.json'
   }
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM