FIX: Query parameters were not being cleared when changing filtering.
This commit is contained in:
parent
cfedbad0e9
commit
b2b7f4d905
|
@ -19,6 +19,10 @@ const controllerOpts = {
|
|||
expandGloballyPinned: false,
|
||||
expandAllPinned: false,
|
||||
|
||||
resetParams() {
|
||||
this.setProperties({ order: "default", ascending: false });
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
||||
changeSort(sortBy) {
|
||||
|
@ -43,8 +47,7 @@ const controllerOpts = {
|
|||
|
||||
refresh() {
|
||||
const filter = this.get('model.filter');
|
||||
|
||||
this.setProperties({ order: "default", ascending: false });
|
||||
this.resetParams();
|
||||
|
||||
// Don't refresh if we're still loading
|
||||
if (this.get('discovery.loading')) { return; }
|
||||
|
|
|
@ -326,6 +326,11 @@ const DiscourseURL = Ember.Object.extend({
|
|||
if (opts.replaceURL) {
|
||||
this.replaceState(path);
|
||||
} else {
|
||||
const discoveryTopics = this.controllerFor('discovery/topics');
|
||||
if (discoveryTopics) {
|
||||
discoveryTopics.resetParams();
|
||||
}
|
||||
|
||||
router.router.updateURL(path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue