You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/components/Route.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,14 @@ Routes can be nested. When a child route path matches, the parent route
30
30
is also activated. Please refer to the [overview][overview] since this
31
31
is a very critical part of the router's design.
32
32
33
+
### `ignoreScrollBehavior`
34
+
35
+
When route or its `params` change, router adjusts window scroll position according to [`scrollBehavior`](https://github.com/rackt/react-router/blob/master/docs/api/create.md#scrollbehavior). This is generally desirable but you might want to opt out of scrolling adjustment for a specific route or a group of routes.
36
+
37
+
If you specify `ignoreScrollBehavior` attribute on a route, changes in `params` or any transitions within its `children` will not adjust scroll position. This can be useful on a search page or in a tabbed interface.
38
+
39
+
Note that changes in `query` never adjust scroll position, regardless of the value of this attribute.
0 commit comments