Resetting query parameter does not work as expected
- Dominant language
- TypeScript
- Stars
- 22.6k
- Forks
- 4.2k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 15
Description
Example project that reproduces it can be found in https://github.com/vmalloc/ember-route-bug-reproduce.
Essentially what happens is if a controller has an observer function on a query param change that resets a second parameter as a response (e.g. resetting the page number when the search term changes) - the second parameter does not get reset when the change is triggered as a result of pressing a link.
In the example the route `/#/items` by default contains no `search` value, and the `page` parameter can be incremented. Then the user clicks the link leading to the same route but with a different `search` value, and the page remains the same...
Moreover, the page segment of the route URL *does* get eliminated *as if* the value returned to its default, but it does not...
Contributor guide
Assessment
This issue has not been assessed yet.