pbeshai / use-query-params

React Hook for managing state in URL query parameters with easy serialization.
https://pbeshai.github.io/use-query-params
ISC License
2.13k stars 95 forks source link

Unable to disable scroll to top #267

Open satejbidvai opened 1 year ago

satejbidvai commented 1 year ago

Scroll to top is still happening when I am using next-query-params@4.2.1. Any solution for that?

I tried using this: https://github.com/pbeshai/use-query-params/issues/13#issuecomment-815577849, but it shows NextRouter was not mounted.

I think next-query-params is scrolling to top by default as { scroll: false} has not been used while doing router.push or router.replace.

Originally posted by @Electron-2002 in https://github.com/pbeshai/use-query-params/issues/13#issuecomment-1571778457

satejbidvai commented 1 year ago

Any progress on this?

adrivelasco commented 1 year ago

same issue here. have you found a solution?

benistary commented 8 months ago

Same here This works on next@14.0.1 AppRouter principe

https://github.com/pbeshai/use-query-params/issues/13#issuecomment-1553274435