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

Search parameter support #19

Open
AndreasDeRijcke opened this issue Dec 9, 2024 · 3 comments · May be fixed by #20
Open

Search parameter support #19

AndreasDeRijcke opened this issue Dec 9, 2024 · 3 comments · May be fixed by #20

Comments

@AndreasDeRijcke
Copy link

Would you be willing to add search parameter support?

My use-case:

  • search page with many options for filtering (checkboxes, radios etc)
  • depending on the screen size, results are not in viewport resulting in lack of visual queue that filtering has happened.
  • query parameters are added programatically to perform the filtering

Using your package, with search parameters appended to the pathname passed to the navigate callback, the leaving-entering logic is triggered as expected.

I imagine taking query parameters into account is not always desired, so a global or per case opt-in is probably recommended.

@maxrpark
Copy link

I ran into the same issue today. The leaving function is called but not the on enter. I am using params for pagination, as recommended on Next.js docs

@ismamz ismamz linked a pull request Dec 10, 2024 that will close this issue
@ismamz
Copy link
Owner

ismamz commented Dec 12, 2024

Hey 👋 @AndreasDeRijcke, @maxrpark, thanks for reporting this. I’ve started working on this feature: #20. The solution is still not 100% ideal.

@AndreasDeRijcke
Copy link
Author

Great, thank you for picking this up so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants