提交 84493a67 编写于 作者: J Jimmy Moon 提交者: Tim Neutkens

Update readme.md (#3957)

Update readme for scroll props related to #3950
上级 dac6e9c1
......@@ -429,6 +429,15 @@ export default ({ href, name }) =>
</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
<p><details>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册