FIX: 'status' param change not filtering the topics in tag route.
Use existing 'filterQueryParams' helper method to set 'queryParams' value for tag route.
This commit is contained in:
parent
cd6a130cd0
commit
56b7777705
app/assets/javascripts/discourse/routes
|
@ -1,15 +1,16 @@
|
|||
import Composer from "discourse/models/composer";
|
||||
import showModal from "discourse/lib/show-modal";
|
||||
import { findTopicList } from "discourse/routes/build-topic-route";
|
||||
import {
|
||||
filterQueryParams,
|
||||
findTopicList
|
||||
} from "discourse/routes/build-topic-route";
|
||||
import { queryParams } from "discourse/controllers/discovery-sortable";
|
||||
import PermissionType from "discourse/models/permission-type";
|
||||
|
||||
export default Discourse.Route.extend({
|
||||
navMode: "latest",
|
||||
|
||||
queryParams: {
|
||||
ascending: { refreshModel: true },
|
||||
order: { refreshModel: true }
|
||||
},
|
||||
queryParams,
|
||||
|
||||
renderTemplate() {
|
||||
const controller = this.controllerFor("tags.show");
|
||||
|
@ -69,10 +70,7 @@ export default Discourse.Route.extend({
|
|||
const controller = this.controllerFor("tags.show");
|
||||
controller.set("loading", true);
|
||||
|
||||
const params = controller.getProperties("order", "ascending");
|
||||
params.order = transition.to.queryParams.order || params.order;
|
||||
params.ascending = transition.to.queryParams.ascending || params.ascending;
|
||||
|
||||
const params = filterQueryParams(transition.to.queryParams, {});
|
||||
const categorySlug = this.categorySlug;
|
||||
const parentCategorySlug = this.parentCategorySlug;
|
||||
const filter = this.navMode;
|
||||
|
|
Loading…
Reference in New Issue