Skip to content

Commit

Permalink
FIX: topics sorting in tag pages is broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinothkannans committed Jan 23, 2020
1 parent 8cc09fc commit 26186ee
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions app/assets/javascripts/discourse/controllers/tags-show.js.es6
Expand Up @@ -5,6 +5,7 @@ import discourseComputed, { observes } from "discourse-common/utils/decorators";
import BulkTopicSelection from "discourse/mixins/bulk-topic-selection";
import NavItem from "discourse/models/nav-item";
import FilterModeMixin from "discourse/mixins/filter-mode";
import { queryParams } from "discourse/controllers/discovery-sortable";

export default Controller.extend(BulkTopicSelection, FilterModeMixin, {
application: inject(),
Expand Down Expand Up @@ -53,15 +54,7 @@ export default Controller.extend(BulkTopicSelection, FilterModeMixin, {
);
},

queryParams: [
"order",
"ascending",
"status",
"state",
"search",
"max_posts",
"q"
],
queryParams: Object.keys(queryParams),

@discourseComputed("category", "tag.id", "filterType", "noSubcategories")
navItems(category, tagId, filterType, noSubcategories) {
Expand Down Expand Up @@ -116,7 +109,7 @@ export default Controller.extend(BulkTopicSelection, FilterModeMixin, {
this.setProperties({ order, ascending: false });
}

this.send("invalidateModel");
this.transitionToRoute({ queryParams: { order, ascending: this.ascending }});
},

toggleInfo() {
Expand Down

1 comment on commit 26186ee

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/sorting-topics-in-tag-intersection-pages-are-not-working/49141/5

Please sign in to comment.