This demo project demonstrates a problem with Ionic 4 scrolling restore
- Start app
- Go to localhost:8000/list
- Scroll to the bottom of the list
- Click on Item 10
- On the detail page click on button "back"
- Scroll restore works: You are at the same scroll position in the list view
- Start app
- Go to localhost:8000/list
- Enter something in the filter input field and click button "Filter list now"
- Filtering is done by changing the route without reloading the component. This is done by defining RouteReuseRules in app.module.ts
- Scroll down and click on item 10
- On the detail page click on button "back"
- You land at the top of the list page. Scroll position has not been restoren
I want the user to be able to copy the URL of the current filter and share it
I do not like the flickering when component is reloaded. And in my real app, I have filter parameters in the URL which need a server request to get more infos about them. So I would have to do a server request for data I already have.
I tried to do the location change with location.go() function. Result is the same. And I do not like the idea of working against the route logic of my app