Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

The renderFilter form used action="", causing browsers to append form parameters to the current URL instead of replacing them. Multiple submissions accumulated duplicate filter= parameters, breaking pagination filtering.

Changes:

  • Set form action to request path without query string using Wai.rawPathInfo theRequest
  • Consolidated duplicate rawPathInfo calls by extracting to shared path variable

Before:

First submit:  /users?filter=john&page=1
Second submit: /users?filter=john&filter=jane&page=1  ❌

After:

First submit:  /users?filter=john&page=1
Second submit: /users?filter=jane&page=1  ✓

The fix ensures form submissions replace query parameters rather than appending to existing ones, restoring v1.3.0 behavior.

Original prompt

This section details on the original issue you should resolve

<issue_title>renderFilter adds filter= to URL many times</issue_title>
<issue_description>In IHP v1.3.0, this was not a problem. If you used the pagination function renderFilter and submitted the form more than once, it would overwrite the filter parameter in the URL. However, in IHP v.1.4.x it keeps adding multiple filter parameters to the URL over and over. This causes the filtering not to work. Since the renderFilter function hasn't changed, I think it may be related to this: ad872d5 somehow.</issue_description>

<agent_instructions>take a look and see whether you can figure this one out</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 11, 2025 15:44
Co-authored-by: mpscholten <2072185+mpscholten@users.noreply.github.com>
Co-authored-by: mpscholten <2072185+mpscholten@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix renderFilter adding multiple filter parameters to URL Fix renderFilter form accumulating duplicate filter parameters Dec 11, 2025
Copilot AI requested a review from mpscholten December 11, 2025 15:49
@mpscholten mpscholten marked this pull request as ready for review December 11, 2025 16:08
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 this pull request may close these issues.

renderFilter adds filter= to URL many times

2 participants