-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
RouterService forces model to refresh when queryParams unchanged #16349
Comments
The other interesting thing which appears in the twiddle is that default While the Router RFC sheds some light on the default query params semantics it's still unclear how the |
This issue is very similar to #15801. It may have the same root cause. However this issue is reproducible without passing any query params to the |
I've got the similar issue right now. And I found a problem. If your QP default is a I know this is just a temporary fix. We need to find the source of the problem |
@Exelord actually in the twiddle I have a non-empty string as a default QP value. |
I believe that this is addressed now, @chadhietala may be able to confirm. |
I've just verified it against ember-source@3.6(cause its release notes say: Here is a repo with reproduction for ember-source@3.6 if helpful. |
I believe this all stems back to the fact that QPs are mutable in Router.js. I haven't had the time to get back around to doing the big refactor around how QPs are treated. Right now there is a great deal of implicit behavior due to this issue. I'm going to try and get back around to soon, just been busy at work trying to wrap up some things before the end of the year. |
is there a work around for this? other than reloading the window. |
on the `view_only` query param, set the `refreshModel` flag to false (its default). this avoids an open ember bug[1] that refreshes model hooks unnecessarily. [1]: emberjs/ember.js#16349
on the `view_only` query param, set the `refreshModel` flag to false (its default). this avoids an open ember bug[1] that refreshes model hooks unnecessarily. [1]: emberjs/ember.js#16349
Still facing this issue when using QPs ( Using Ember source and CLI: 3.22 |
Same issue here |
We also ran into this issue. The workaround we are using in the meantime is not to use the QP's default value and always set it to a different value (with the drawback that it always appears in the url). |
Still an issue on Ember 4.4.4 and Ember 4.9.2 😢 |
This is terrible, why is this not fixed yet. |
@PowerP could you submit a fix? I'll make sure to get it reviewed as soon as possible! |
Still an issue on Ember 5.4.1 😭 |
I have a query param defined in the controller and set it up to
refreshModel
in the route.Then I inject the
router
service to the component and trigger a transition just with a sub-route name(no passing query params).Expected:
Transition is complete. Parent route's model is not reloaded.
Actual:
Query param treated as changed which causes a parent route to reload.
Reproduction: https://ember-twiddle.com/efda3c9e57835c987404a8f5968c7579?openFiles=routes.application.js%2C&route=%2Fin
The text was updated successfully, but these errors were encountered: