Need to maintain scroll position when back button is pressed using history goBack function
Asked Answered
M

0

6

I have a list of products and when particular product is clicked it opens a detail view page. I am using "this.history.goBack()" which is triggered by a button to go back to list of products.

My problem is that every time i hit back button product list opens at the top of the page but i want to maintain previous scroll position.

I found this in upgrade guide but its of no help: In 0.13.x we had a couple of implementations to restore scroll position, we've realized that we can build a better implementation on top of the router and will be doing that very soon, before the 1.0 final release, but it doesn't need to be baked into routing like it was before.

I am using version 1.0, so can anyone please help me out in order to achieve this.

Manumit answered 27/9, 2015 at 18:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.