From 0abd19a99c6c4378fcf9a297668a16d699590a9d Mon Sep 17 00:00:00 2001 From: Vinta Chen Date: Sun, 27 Sep 2026 14:47:06 +0800 Subject: [PATCH] fix: number rows in sorted order after a column sort applyFilters walked the static load-order NodeList, so after sorting by a column header, row numbers kept each row's original load-order position instead of counting 1..n down the sorted table. Co-Authored-By: Claude --- website/static/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/static/main.js b/website/static/main.js index 93eac711..5314aca9 100644 --- a/website/static/main.js +++ b/website/static/main.js @@ -145,7 +145,9 @@ function applyFilters() { collapseAll(); - rows.forEach(function (row) { + // Number rows in their sorted DOM order, not the load order `rows` keeps + const orderedRows = tbody ? tbody.querySelectorAll("tr.row") : rows; + orderedRows.forEach(function (row) { let show = true; if (query) {