fix: changing the page, the period or a filter keeps the scroll position
This commit is contained in:
1 parent
f771538f3e
commit
4936258f32
3 files changed
+8
-4
No files matched your search
@@ -10,5 +10,5 @@ export function setQuery(values: Record<string, string | null | undefined>) {
|
||||
url.searchParams.delete(key);
|
||||
}
|
||||
}
|
||||
return goto(url, { replace: true, state: page.state });
|
||||
return goto(url, { replace: true, reset: false, state: page.state });
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
function go(target: number) {
|
||||
if (target >= 1 && target <= pages && target !== page) {
|
||||
goto(href(target));
|
||||
goto(href(target), { reset: false });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,11 @@
|
||||
</script>
|
||||
|
||||
{#if pages > 1}
|
||||
<nav aria-label="Pages" class="flex items-center gap-0.5 text-[12px]">
|
||||
<nav
|
||||
aria-label="Pages"
|
||||
class="flex items-center gap-0.5 text-[12px]"
|
||||
data-sveltekit-reset="false"
|
||||
>
|
||||
{#if page > 1}
|
||||
<a
|
||||
class="rounded-cladd-sm px-2 py-1 text-cladd-fg-soft hover:bg-row-hover hover:text-cladd-fg"
|
||||
|
||||
Reference in new issue
Block a user