Closed seallard closed 8 months ago
Alternatively use https://reactrouter.com/en/main/components/scroll-restoration
We are using Tabs for navigating between workflows, which is why clicking the back button always returns us to the Homepage. To enable the functionality of the back button, we need to add routes to the Tabs.
ScrollRestoration has a few limitations:
The scroll position can be saved either in local storage or within the global state.
Done!
To enable the user to get back to the correct page/scroll position, we need to store it in a global state (local storage or redux). This state will have to be read when a tab is loaded and set the page/scroll position accordingly.
Store analyses and orders page/scroll position separately.