InstantSearch
/
React
/
V6
/
API reference
Aug. 07, 2023
ScrollTo | React InstantSearch V6 (Deprecated)
This version of React InstantSearch has been deprecated in favor of the latest version of React InstantSearch.
Signature
Signature
<ScrollTo // Optional parameters scrollOn={string} />
About this widget
The ScrollTo
widget makes the page scroll to the component wrapped by it when the searchState
is updated. By default when the page number changes, the scroll goes to the wrapped component.
Examples
Copy
1
2
3
4
5
import { ScrollTo, Hits } from 'react-instantsearch-dom';
<ScrollTo>
<Hits />
</ScrollTo>
Props
scrollOn
Optional
Type:
string
The widget state key to listen for changes. See the list of available keys by reading how the searchState
is structured.
Copy
1
2
3
<ScrollTo scrollOn="query">
<Hits/>
</ScrollTo>
Did you find this page helpful?