From cca2f6fc6934ee9b2ef8136aa6bf934c5c74ef80 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 16 Jul 2018 18:35:30 +0200 Subject: [PATCH] Always start with empty search field on Query Log page Signed-off-by: DL6ER --- scripts/pi-hole/js/queries.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/pi-hole/js/queries.js b/scripts/pi-hole/js/queries.js index 3ea38cff..79a9823b 100644 --- a/scripts/pi-hole/js/queries.js +++ b/scripts/pi-hole/js/queries.js @@ -275,9 +275,11 @@ $(document).ready(function() { var data = localStorage.getItem("query_log_table"); // Return if not available if(data === null){ return null; } - // Ensure that we always start on the first page (most recent query) data = JSON.parse(data); + // Always start on the first page to show most recent queries data["start"] = 0; + // Always start with empty search field + data["search"]["search"] = ""; // Apply loaded state to table return data; },