Skip to content

Commit 71e12c1

Browse files
Improve useRedirect's _scrollToTop's doc
Co-authored-by: Francois Zaninotto <francois@marmelab.com>
1 parent fdaf387 commit 71e12c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/useRedirect.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ redirect((resource, id, data) => {
7777
}, 'posts', 1, { hasComments: true });
7878
```
7979

80-
## `_scrollToTop`
80+
## Disable Scroll To Top
8181

82-
**Tip:** By default, react-admin scrolls to top on each redirection. You can disable it as follows:
82+
By default, react-admin scrolls to top on each redirection. You can disable it by passing a `_scrollToTop: false` option in the 5th argument:
8383

8484
```jsx
8585
redirect(`/deals/${deal.id}/show`, undefined, undefined, undefined, {

0 commit comments

Comments
 (0)