Skip to content
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

Updating searchParams while using parallel routes doesn't update it for the initial page #62451

Open
spojskic opened this issue Feb 23, 2024 · 1 comment
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@spojskic
Copy link

Link to the code that reproduces this issue

https://github.com/spojskic/nextjs-parallel-routes-issue

To Reproduce

  1. Install dependencies npm i or pnpm i
  2. Run the dev server npm run dev or pnpm run dev
  3. Confirm that pagination is working
  4. Click on Edit button on any user in table to open second page side by side
  5. Test pagination again (not working)

Current vs. Expected behavior

Following the steps from previous section, I expected for pagination to work, but it didn't. After updating the URL with new search params with parallel route nothing happens but it should fetch new data based on current_page search param.

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020
Binaries:
  Node: 20.10.0
  npm: 10.4.0
  Yarn: N/A
  pnpm: 8.15.3
Relevant Packages:
  next: 14.1.0
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

App Router, Routing (next/router, next/navigation, next/link)

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

Additional context

No response

@spojskic spojskic added the bug Issue was opened via the bug report template. label Feb 23, 2024
@github-actions github-actions bot added the Navigation Related to Next.js linking (e.g., <Link>) and navigation. label Feb 23, 2024
@balazsorban44 balazsorban44 added Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. and removed Navigation Related to Next.js linking (e.g., <Link>) and navigation. labels Apr 19, 2024
@mech
Copy link

mech commented Apr 27, 2024

Having this issues too. It seems some of the parallel routes will not get re-rendered when searchParams got changes unless it is being hard refresh.

Monosnap Untitled 2 2024-04-27 14-43-24

I am trying to implement a Master-Detail layout with the table on the @children slot and the details at the @details slot. However when go to the next page, the @children's table is unable to re-render by means of searchParams being changed. Only the @details slot get to see the updated searchParams.

Is Parallel Route not really meant for Master-Detail layout pattern?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

No branches or pull requests

3 participants