From cf2e3ddac0c3c39c6e1fd07aa607d2dae07684ec Mon Sep 17 00:00:00 2001 From: DL6ER Date: Thu, 29 Dec 2016 18:50:21 +0000 Subject: [PATCH] Force redraw on expand necessary with scrolling enabled... --- js/pihole/settings.js | 6 +++++- settings.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/pihole/settings.js b/js/pihole/settings.js index a36462ec..8cf646b2 100644 --- a/js/pihole/settings.js +++ b/js/pihole/settings.js @@ -57,10 +57,11 @@ $("#DHCPchk").click(function() { $("input.DHCPgroup").prop("disabled", !this.checked); }); +var leasetable; $(document).ready(function() { if(document.getElementById("DHCPLeasesTable")) { - $("#DHCPLeasesTable").DataTable({ + leasetable = $("#DHCPLeasesTable").DataTable({ dom: "<'row'<'col-sm-7'i><'col-sm-5'f>>" + "<'row'<'col-sm-12'tr>>", "paging": false, @@ -68,6 +69,9 @@ $(document).ready(function() { "scrollY": "200px", "scrollX" : true }); + $('#leaseexpand').on( 'click', function () { + setTimeout(function(){leasetable.draw();},100); + } ); } } ); diff --git a/settings.php b/settings.php index e3dc949d..c812914f 100644 --- a/settings.php +++ b/settings.php @@ -251,7 +251,7 @@

DHCP leases

-
+