-
-
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
[Bug] Query param sticky value lost #19307
Comments
Yeah, router_js v7.1.1 is the cause for it. Specifically, tildeio/router.js#308 that aimed to deal with query params serialization errors and introduced this bug. Apparently, tests didn't take into account the intermediate state when query params were reset to default values. 😥 cc @rwjblue |
This comment has been minimized.
This comment has been minimized.
|
@rreckonerr I just hoped 3.25 would resolve my issue as well, but it doesn't 😢 I don't remember seeing this on 3.22 |
@sly7-7 I just symlinked
Can you check out if it works for you following the steps below? Steps to reproduce
|
@rreckonerr this is perfect timing :) I've just reproduced against 3.25 on a minimal repo. The bug seems to occur only if there is a loading template. I'm checking with this version right now |
@rreckonerr I've created https://github.com/sly7-7/bug-query-params where the bug is still here, even against ember's master branch. |
@sly7-7 It might be that the fix is included in not yet release 3.27.x. 👇
Were you able to fix the issue by linking the ember.js repo? (want to make sure that I didn't screw up something while doing so) |
@rreckonerr I've ran against master, so this should be the same result ? Anyway, I'll try :) |
Appears that I was still running ember 3.25 even after yarn linking 3.27. The bug is still there, thanks @sly7-7 |
@rreckonerr @patsy-issa , if that could help, as a workaround for now, I removed the {{#if this.isLoading}}
<LoadingComponent>
{{else}}
{{outlet}}
{{/if}} in the template. |
@patsy-issa This should be solved now, but we have to wait a new release of the router, and a bugfix release of ember.js |
Yup, tested it against https://github.com/patsy-issa/ember-qp-bug-reproduction and it works! |
🐞 Describe the Bug
Query parameters lose their sticky value and revert to the default defined within the controller of the parent route when transitioning to a child route. Both the parent and child route have slow model hooks and loading substates. The last working version that does not have this bug is ember-source
2.22.0
, all versions since then up to2.24.0-beta.2
contain this bug.#19249 was aimed at resolving this issue but it seems the use case presented in the reproduction might have slipped by.
🔬 Minimal Reproduction
yarn install
&yarn start
/media
😕 Actual Behavior
During the transition the list will revert back to the albums for a short duration before transitioning into the correct route. This is due to the
filter
query parameter's value being set to its default value when the loading route is activating.🤔 Expected Behavior
The
filter
query parameter's value does not change when the loading route is active.🌍 Environment
^2.22.1
➕ Related issues
cacheValuePrefix
#11857The text was updated successfully, but these errors were encountered: