Ion-infinite-scroll - how to Scroll to Top (ScrollTop)

Wanted to scroll to top from Typescript in ion-infinite-scroll. I have a search box together with an infinite scroll to show result.

currently am using el.shadowRoot.children[1].scrollTop = 0 ; Looking for a more native solution.

You can use the scrollToTop() method on ion-content: ion-content: Scrollable CSS Component for Ionic App Content Areas

1 Like