# Making filters work without reload

**URL:** https://meta.discourse.org/t/making-filters-work-without-reload/58049
**Category:** Development
**Created:** [February 27, 2017, 10:00pm UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049 "2017-02-27T22:00:19Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 27, 2017, 10:00pm UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049/1 "2017-02-27T22:00:19Z")

</div>

I’ve just done some work on discourse-solved, and added some filters. These work fine if you visit the URLs directly, but if you follow a link from within the site then it doesn’t work.

If I click on this link, it doesn’t apply the filter until I hit reload.

[Support - Discourse Meta](https://meta.discourse.org/c/support?solved=true)

Do I need to add it to the Ember router or something like that? How would I go about doing that?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 27, 2017, 10:05pm UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049/2 "2017-02-27T22:05:33Z")

</div>

AddDiscoveryQueryParam is your friend

[https://github.com/discourse/discourse-assign/blob/master/assets/javascripts/discourse/initializers/extend-for-assigns.js.es6#L59](https://github.com/discourse/discourse-assign/blob/master/assets/javascripts/discourse/initializers/extend-for-assigns.js.es6#L59)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 27, 2017, 10:16pm UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049/3 "2017-02-27T22:16:49Z")

</div>

Well, that was easy - it’s almost like someone’s had this problem before 😉

Thanks again, I’ve submitted another PR

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [February 27, 2017, 11:05pm UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049/4 "2017-02-27T23:05:09Z")

</div>

Just in case someone comes across this thread in future, using “true”/“false” in the query variables can create some unexpected behaviour. Ember will consider “false” the default, which might not be what you want.

> **[Boolean Query Params](https://discuss.emberjs.com/t/boolean-query-params/4301)**
>
> I understand that this is likely to change before it makes it out of Canary, and from the latest Core Team Meeting Minutes (2014-02-21) it sounds like they’re already aware that this is an issue. That being said, is there a way with the current...

---

<div class="post-metadata">

### Author: ![eherman](https://avatars.discourse-cdn.com/v4/letter/e/6a8cbe/32.png) [@eherman](https://meta.discourse.org/u/eherman)
#### Post date: [July 22, 2020, 8:47am UTC](https://meta.discourse.org/t/making-filters-work-without-reload/58049/5 "2020-07-22T08:47:49Z")

</div>

Is this working ?

I’ve noticed when i select the filter `solved` it doesnt filter the topics unless i reload the page.
