Skip to content
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

Query params with arrays are turned into strings when route.refresh() is used #14715

Closed
kalanda opened this issue Dec 13, 2016 · 2 comments
Closed

Comments

@kalanda
Copy link

kalanda commented Dec 13, 2016

Query params containing arrays are turned into strings when route.refresh() is called and another query param is changed at the same time.

I put here a link to a twiddle using ember2.9.0 and an animated gif to see the testing process.

The first button sets the filters param to an initial value of ['filter1', 'filter2'] and the value is well represented in the URL's query string.

The second button calls an action that just executes route.refresh() and the model()method of the route is receiving an array with ['filter1', 'filter2'] in the filtersparam.

The third button shows the issue by calling an action that first changes a different query param (otherParam) and after that, executes route.refresh() and the model()method of the route is receiving a string instead of an array with the value of filters.

https://ember-twiddle.com/0c3833a0ae05e1350f4e0e8cbd4f125c?openFiles=controllers.application.js%2C

queryparams-refresh-issue

@nathanhammond
Copy link
Member

Known issue, duplicate of #14174

@Serabe
Copy link
Member

Serabe commented Dec 13, 2016

Closing as duplicate. Thank you all!

@Serabe Serabe closed this as completed Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants