From ccbd752ffff716ed7799a65e493a68c307ecb0a6 Mon Sep 17 00:00:00 2001 From: Johann Date: Tue, 9 Jun 2026 23:43:50 +0200 Subject: [PATCH] feat: reset filter on directory navigation --- index.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.php b/index.php index 4f2c24c..af17ef8 100644 --- a/index.php +++ b/index.php @@ -959,6 +959,11 @@ if (isset($_GET['action'])) { } // ── Navigation ───────────────────────────────────────────────── + function resetFilter() { + filterInput.value = ''; + renderTable(); + } + function navigateTo(path) { currentPath = path; @@ -967,6 +972,7 @@ if (isset($_GET['action'])) { historyStack.push(path); historyIndex = historyStack.length - 1; + resetFilter(); updateURL(); loadDirectory(); updateNavButtons(); @@ -976,6 +982,7 @@ if (isset($_GET['action'])) { if (historyIndex > 0) { historyIndex--; currentPath = historyStack[historyIndex]; + resetFilter(); updateURL(); loadDirectory(); updateNavButtons(); @@ -986,6 +993,7 @@ if (isset($_GET['action'])) { if (historyIndex < historyStack.length - 1) { historyIndex++; currentPath = historyStack[historyIndex]; + resetFilter(); updateURL(); loadDirectory(); updateNavButtons();