Skip to content

Commit

Permalink
Add documentation for <Route ignoreScrollBehavior>
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Jan 5, 2015
1 parent 4c241e9 commit edfe320
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/api/components/Route.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Routes can be nested. When a child route path matches, the parent route
is also activated. Please refer to the [overview][overview] since this
is a very critical part of the router's design.

### `ignoreScrollBehavior`

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.

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.

Note that changes in `query` never adjust scroll position, regardless of the value of this attribute.

Example
-------

Expand Down

0 comments on commit edfe320

Please sign in to comment.