feat: reset filter on directory navigation
This commit is contained in:
@@ -959,6 +959,11 @@ if (isset($_GET['action'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ── Navigation ─────────────────────────────────────────────────
|
// ── Navigation ─────────────────────────────────────────────────
|
||||||
|
function resetFilter() {
|
||||||
|
filterInput.value = '';
|
||||||
|
renderTable();
|
||||||
|
}
|
||||||
|
|
||||||
function navigateTo(path) {
|
function navigateTo(path) {
|
||||||
currentPath = path;
|
currentPath = path;
|
||||||
|
|
||||||
@@ -967,6 +972,7 @@ if (isset($_GET['action'])) {
|
|||||||
historyStack.push(path);
|
historyStack.push(path);
|
||||||
historyIndex = historyStack.length - 1;
|
historyIndex = historyStack.length - 1;
|
||||||
|
|
||||||
|
resetFilter();
|
||||||
updateURL();
|
updateURL();
|
||||||
loadDirectory();
|
loadDirectory();
|
||||||
updateNavButtons();
|
updateNavButtons();
|
||||||
@@ -976,6 +982,7 @@ if (isset($_GET['action'])) {
|
|||||||
if (historyIndex > 0) {
|
if (historyIndex > 0) {
|
||||||
historyIndex--;
|
historyIndex--;
|
||||||
currentPath = historyStack[historyIndex];
|
currentPath = historyStack[historyIndex];
|
||||||
|
resetFilter();
|
||||||
updateURL();
|
updateURL();
|
||||||
loadDirectory();
|
loadDirectory();
|
||||||
updateNavButtons();
|
updateNavButtons();
|
||||||
@@ -986,6 +993,7 @@ if (isset($_GET['action'])) {
|
|||||||
if (historyIndex < historyStack.length - 1) {
|
if (historyIndex < historyStack.length - 1) {
|
||||||
historyIndex++;
|
historyIndex++;
|
||||||
currentPath = historyStack[historyIndex];
|
currentPath = historyStack[historyIndex];
|
||||||
|
resetFilter();
|
||||||
updateURL();
|
updateURL();
|
||||||
loadDirectory();
|
loadDirectory();
|
||||||
updateNavButtons();
|
updateNavButtons();
|
||||||
|
|||||||
Reference in New Issue
Block a user