ember.js icon indicating copy to clipboard operation
ember.js copied to clipboard

Array query params do not track mutation

Open cibernox opened this issue 9 years ago • 3 comments

If you have a link like this one: {{#link-to 'foo' (query-params numbers=numbers)}} the URL of the link does not get updated if numbers is mutated with pushObject/removeObject, you have to replace the array by a different array.

It's not too bad as a bug because clicking the link still works as expected when clicked, it's just the href of the link the one that doesn't update. Perhaps something to take into account in the new url-for helpers that is part of the new route service.

Reproduction in a twiddle: https://ember-twiddle.com/ac26716b462cf3e53398b42a390a29e3?openFiles=controllers.application.js%2C&route=%2Ffoo%3Fnames%3D%255B%2522Mary%2522%255D

cibernox avatar Jan 23 '17 12:01 cibernox

Thank you for your report!

Serabe avatar Jan 25 '17 21:01 Serabe

@cibernox just checked so see if this is still an issue with v3.4.1 and I see the same issue, href is not updated.

pixelhandler avatar Sep 14 '18 18:09 pixelhandler

@cibernox is this still an issue with current release of Ember? Is so can you update the twiddle with a specific version of Ember?

pixelhandler avatar Jan 25 '19 18:01 pixelhandler