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 <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-09-27 14:48:02 +08:00
co-authored by Claude
parent f0ebe92155
commit 0abd19a99c
+3 -1
View File
@@ -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) {