Preserve existing skip value when navigating to the next matching item

This commit is contained in:
Ross
2025-10-29 21:43:27 +00:00
parent 76d0db0e94
commit 3805c701d3
@@ -153,7 +153,13 @@
const params = new URLSearchParams();
if (activeCategory) params.set('category', activeCategory);
if (activeStatus) params.set('status', activeStatus);
// Next navigates to the next matching item (no skip)
// Preserve any existing skip value from current URL so the caller's
// skip position isn't lost when moving to the next item.
const curParams = new URLSearchParams(window.location.search);
const curSkip = curParams.get('skip');
if (curSkip) params.set('skip', curSkip);
// Next navigates to the next matching item (respecting skip)
const qs = params.toString();
window.location.href = qs ? (base + '?' + qs) : base;
});