Skip to content

Conversation

@lcarrasco-xdev
Copy link
Member

Steps to reproduce:

  1. Enable url parameter in filter component
  2. Add an condition
  3. The base url is re-created in the url parameter.
    image

Expected behaviour: The base url should only exist once in url.

@sonarqubecloud
Copy link

Copy link
Member

@AB-xdev AB-xdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work :)

@AB-xdev
Copy link
Member

AB-xdev commented Oct 18, 2024

@lcarrasco-xdev
It also fails if there are any other queryparameters defined in the URL (not sure if this is related to this change or was always the case):
http://localhost:8080/?input=2000-01-01&condition=is%20after&badgeId=noBadgeId&field=Birthday&editable=false&deletable=true&id=filter1 → Works ✔️
http://localhost:8080/?input=2000-01-01&condition=is%20after&badgeId=noBadgeId&field=Birthday&editable=false&deletable=true&id=filter1&abc=def → Fails to restore the filter ❌

For the future we could maybe do the same as in the other grid-filter component by simply just setting the current path/query parameters.. Maybe this would make it simpler and more error resistent :)

@AB-xdev
Copy link
Member

AB-xdev commented Oct 18, 2024

Merging this anyway now since this fix is a start :)

@AB-xdev AB-xdev merged commit 719edc2 into develop Oct 18, 2024
7 checks passed
@AB-xdev AB-xdev deleted the base-url-in-query-parameter-fix branch October 18, 2024 12:01
xdev-gh-bot pushed a commit that referenced this pull request Aug 18, 2025
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.

2 participants