Skip to content

Commit

Permalink
fix(InstantSearchNext): do not scroll on push (#5861)
Browse files Browse the repository at this point in the history
  • Loading branch information
aymeric-giraudet authored Sep 21, 2023
1 parent 7fb797c commit 771deea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-instantsearch-nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function Search() {
}
```

Import the `<InstantSearchNext>` component from the `react-instantsearch-nextjs` package, and replace the <%= widget_link('instantsearch', 'react') %> component with it, without changing the props.
Import the `<InstantSearchNext>` component from the `react-instantsearch-nextjs` package, and replace the [`<InstantSearch>`](https://www.algolia.com/doc/api-reference/widgets/instantsearch/react/) component with it, without changing the props.


```diff
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function InstantSearchNext<
if (this.isDisposed) {
return;
}
router.push(url);
router.push(url, { scroll: false });
};

if (typeof passedRouting === 'object') {
Expand Down

0 comments on commit 771deea

Please sign in to comment.