diff --git a/modules/http/webif/gstatic/datatables/datatables.defaults.js b/modules/http/webif/gstatic/datatables/datatables.defaults.js index 10dea28a48..e10aa52772 100755 --- a/modules/http/webif/gstatic/datatables/datatables.defaults.js +++ b/modules/http/webif/gstatic/datatables/datatables.defaults.js @@ -65,6 +65,15 @@ $(window).bind('datatables_defaults', function() { shngGetUpdatedData(null, null, 0); } }); + // update content on pagelength change - if activated + $(".dataTables_length").off("change").on("change", function () { + let tab = $(this).closest('.tab-pane').attr('id'); + let dataTable = $(this).closest('.tab-pane').find(".dataTable").DataTable(); + if (window.initial_update == 'true' && window.pageLength[tab]['pagelength'] < dataTable.page.len()){ + console.log("Instant value update after length change"); + shngGetUpdatedData(null, null, 0); + } + }); // Warning if first column is not empty (for responsive + sign) td_content = $(this).find('tbody').find('td:first-child').html(); if (td_content != '' && td_content != 'No data available in table')