mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Update readme.md (#3957)
Update readme for scroll props related to #3950
This commit is contained in:
parent
dac6e9c17d
commit
84493a67b3
|
@ -429,6 +429,15 @@ export default ({ href, name }) =>
|
||||||
</Link>
|
</Link>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Disabling the scroll changes to top on page
|
||||||
|
|
||||||
|
The default behaviour of `<Link>` is to scroll to the top of the page. When there is a hash defined it will scroll to the specific id, just like a normal `<a>` tag. To prevent scrolling to the top / hash `scroll={false}` can be added to `<Link>`:
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<Link scroll={false} href="/?counter=10"><a>Disables scrolling</a></Link>
|
||||||
|
<Link href="/?counter=10"><a>Changes with scrolling to top</a></Link>
|
||||||
|
```
|
||||||
|
|
||||||
#### Imperatively
|
#### Imperatively
|
||||||
|
|
||||||
<p><details>
|
<p><details>
|
||||||
|
|
Loading…
Reference in a new issue