-
-
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] Nested query params don't work with refresh model #18268
Comments
Maybe I'm missing something but the issue isn't the nested query param but that the name of the query param contains a dot, isn't it? let qp.urlKey = 'nested.foo';
get(this, `queryParams.${qp.urlKey}`); is the same as get(this, 'queryParams.nested.foo'); and let queryParams = get(this, 'queryParams');
get(queryParams, 'nested.foo'); In all cases Are you trying to bind the value of an object (e.g. service) to a query param? If that's the case I would recommend to create an alias and use that one. |
@jelhan the query param is correct in it being a path to a property on a controller.
That's all fine. The problem is when it reaches the route.
The function Switching to use an alias would work, but that's basically a workaround rather than a fix |
[BUGFIX] Fix #18268 query param options not being read
If you have
_optionsForQueryParam
fails to work because it usesget(this,
queryParams.${qp.urlKey})
when really the vaule isqueryParams[qp.urlKey]
. Same idea for props.So with the current implementation of
_optionsForQueryParam
the nested query param doesn't work. And as a consequence when QPs change the Route can't determine if that QP is marked as refreshModel.Example (with rudimentary fix):
https://ember-twiddle.com/0a1917cff72d5720d69e0382276e6722?openFiles=routes.application.js%2C
The text was updated successfully, but these errors were encountered: