Skip to content

Commit 106e904

Browse files
committed
Merge pull request #657 from gaearon/patch-2
Add documentation for <Route ignoreScrollBehavior>
2 parents 4c241e9 + edfe320 commit 106e904

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/api/components/Route.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ Routes can be nested. When a child route path matches, the parent route
3030
is also activated. Please refer to the [overview][overview] since this
3131
is a very critical part of the router's design.
3232

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.
40+
3341
Example
3442
-------
3543

0 commit comments

Comments
 (0)