next-router-scroll icon indicating copy to clipboard operation
next-router-scroll copied to clipboard

feat: Add toggle to restore scroll position for same locations

Open tobilen opened this issue 4 years ago • 3 comments

Currently, the scroll restoration only gets restored when the history navigation (either backwards or forwards) is used. In my case, i want the scroll restoration to be restored when a link is clicked on the page that leads to the same location as well.

This PR adds a prop called restoreSameLocation to the RouterScrollProvider. false by default, it will enable this behavior if it is explicitly set.

Tests and documentation has been added as well. Let me know if anything is missing

tobilen avatar Jan 07 '22 10:01 tobilen

@satazor anything missing from this?

fyi, i have deployed this fork to tobilen-next-router-scroll for testing purposes

tobilen avatar Jan 21 '22 08:01 tobilen

@tiagodinis whats the status on this? can you give an update?

tobilen avatar Mar 21 '22 10:03 tobilen

:(

VladBrok avatar Jun 12 '23 05:06 VladBrok