Scroll To Top of Page when clicking Pagination or Refinement Widget - InstantSearch.JS


I am new to Algolia and love the platform. I am trying to scroll to the top of the page or load to the top of the page upon clicking the pagination widget or refinement widget such as refinementList, menu, hierarchicalmenu. I would think this option should be available since Algolia is decently customizable but I did see a post saying that it doesn’t make sense.

It totally makes sense because if you click next page or a refinement it should bring you to the top so that the customer can see the initial results as a good UX! If anyone could please help that would be greatly appreciated, I’ve tried so may variations of the below and it doesn’t work for me and only scrolls to the top of the hits section. Thank you.

container: ‘#pagination’,
scrollTo: ‘body’,