We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33c43ee commit 2e6301aCopy full SHA for 2e6301a
app/router.options.ts
@@ -7,7 +7,12 @@ export default {
7
return savedPosition
8
}
9
10
- // If only query parameters changed (same path), don't scroll
+ // Scroll to top when main search query changes
11
+ if (to.path === '/search' && to.query.q !== from.query.q) {
12
+ return { left: 0, top: 0 }
13
+ }
14
+
15
+ // Don't scroll for other param changes (filters, pagination, etc.)
16
if (to.path === from.path) {
17
return false
18
0 commit comments