question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

href-to helper doesn't recompute when query params change

See original GitHub issue

I’m using ember-source 3.20 and started noticing an issue where the service:-routing. generateURL returns a URL with query params appended if the route where you are loading the page on has query params already in the URL, even if the usage of href-to in the template does not specify any query params. This is weird behavior and is causing bugs in our application that has a lot of filtering. The flow now for a user:

  1. filters by something
  2. reloads the page with the query param in the URL
  3. the side nav link has hardcoded the query param in the href

The service:router. urlFor seems to be the better way to go and fixes the issue with the non-wanted query params in the href.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
GavinJoycecommented, Aug 6, 2020

Yes, I’ll do that soon.

0reactions
jordpocommented, Aug 6, 2020

Awesome - thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

React doesn't reload component data on route param change ...
When I am on a product page and try to follow a ProductHistory link, the URL updates and a render occurs, but the...
Read more >
Query Parameters - Routing - Ember Guides
When a controller's query param property is currently set to its default value, this value won't be serialized into the URL. So in...
Read more >
Update search params without re-rendering everything · Issue ...
In v6, changing the query string (using navigate, or the new useQueryParams hook), will always cause a full re-render from . Is there...
Read more >
How To Use Query Parameters with Angular Router
In this article, we will reference an example of an application that displays a list of products to understand how to use query...
Read more >
Prefill Lookups Using Secure Parameters
Learn how to use secure lookup parameters for prefilling.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found