Replies: 1 comment 1 reply
-
This worked for me: #186 (comment) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all.
I'm building an app with a bunch of charts in the index route. I've got a search param (range) that selects the time range of these charts (24h, 7d, 30d, etc).
When a user selects another range in the dropdown, my onChange calls the useSearchParams's
setSearchParams()
function to set this range parameter, which the loader then uses to fetch the correct data and the charts are updated with this data (page looks the same visually, except for the changed data)This is working well, except the page is scrolling to the top every time the range is changed. My root route.tsx has
unstable_shouldReload
always returning false, so the data is coming through a fetch for the index route. What am I doing wrong here? How can I keep the page in the same scroll position?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions