-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run the loader on change of searchParams #54
Comments
Have you tried the |
@kapsule-studio Unfortunately
Would you have any further ideas? Happy to provide debug information. My current workaroundInvalidate route const applySearchParamsWorkaround = (url: URL): URL => {
const { location } = window
const isSamePage = url.pathname === location.pathname
const paramsChanged = url.search !== location.search
if (isSamePage && paramsChanged) {
url.pathname = `force_reload_${Math.random()}`
}
return url
}
return (
<ProgressBar
shallowRouting
targetPreprocessor={applySearchParamsWorkaround}
/> Use custom useRouterimport { useRouter } from 'next-nprogress-bar' |
Thanks for the workaround! @stefan-girlich |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, I just wanted to know if I can run the top-loading bar on every change in the search parameters.
The text was updated successfully, but these errors were encountered: