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

Fix separator issue in URL parameter #1483

Open
dmartinezh97 opened this issue Oct 28, 2024 · 0 comments
Open

Fix separator issue in URL parameter #1483

dmartinezh97 opened this issue Oct 28, 2024 · 0 comments

Comments

@dmartinezh97
Copy link

dmartinezh97 commented Oct 28, 2024

Describe the bug
When using the pagination feature, the URL for the prev parameter does not correctly append the query string separator. This results in malformed URLs when navigating through pages.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a page with a pagination component.
  2. Ensure the current URL contains a query string (e.g., https://example.com/data?page=1).
  3. Click on the pagination button to go to the next page.
  4. Observe the resulting URL for the prev parameter.

Expected behavior
The expected behavior is that when navigating through pages, the URL should correctly append parameters. For example, if the current URL is https://example.com/data?page=1 and the user navigates to page 2, the resulting URL should be https://example.com/data?page=1&page=2.

Screenshots
N/A

Desktop:

  • OS: Windows 11
  • Browser: Chrome
  • Version: 117.0.5938.92

Smartphone
N/A

Additional context
A possible solution is to modify the URL construction logic in the pagination code to check if the prev URL already contains a ?. If it does, the code should use & as the separator; otherwise, it should use ?.

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

No branches or pull requests

1 participant