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:47:06 +08:00
parent f0ebe92155
commit 0abd19a99c
No known key found for this signature in database
GPG key ID: B93DE4F003C33630

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) {