fix(frontend): reload the file grid on filter/sort change
deploy / deploy (push) Successful in 57s

Changing the filter (or sort/order) reset the grid to empty but never fetched
page 1 — the reset effect only loaded for the deep-link anchor case and
otherwise relied on InfiniteScroll, which doesn't re-trigger without a remount
or scroll. So filtering blanked the list until a hard refresh. Load page 1 from
the reset effect itself for the non-anchor case (guarded by `loading`, so it
doesn't double-fetch with InfiniteScroll's mount load).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-11 15:49:34 +03:00
parent e7d24f0677
commit 9a14c50250
+5 -1
View File
@@ -119,9 +119,13 @@
error = '';
// Deep-link return carrying a position anchor but no loaded grid: load a
// window centred on the anchor instead of page 1, so we can scroll to it
// and grow the grid in both directions.
// and grow the grid in both directions. Otherwise (first mount, or a sort/
// filter change) load page 1 right here — the list isn't remounted on a
// query change, so InfiniteScroll won't re-trigger on its own.
if (firstRun && anchorParam) {
void loadAroundAnchor(anchorParam);
} else {
void loadMore();
}
});