FIX: Regression after a core change (#27)
a3d0a9edbb
in core converted the Users route to a native class, which meant that `queryParams` merging no longer works.
Extend it manually in `init()`.
This commit is contained in:
parent
1ef7e3e2b1
commit
36dd79a8c3
|
@ -11,6 +11,11 @@ export default {
|
||||||
api.modifyClass("route:users", {
|
api.modifyClass("route:users", {
|
||||||
pluginId: "user-card-directory",
|
pluginId: "user-card-directory",
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this._super(...arguments);
|
||||||
|
this.queryParams.cards = { refreshModel: true };
|
||||||
|
},
|
||||||
|
|
||||||
get templateName() {
|
get templateName() {
|
||||||
if (this.modelFor("users")?.showAsCards) {
|
if (this.modelFor("users")?.showAsCards) {
|
||||||
return "users-as-card-directory";
|
return "users-as-card-directory";
|
||||||
|
@ -26,10 +31,6 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
queryParams: {
|
|
||||||
cards: { refreshModel: true },
|
|
||||||
},
|
|
||||||
|
|
||||||
model(params) {
|
model(params) {
|
||||||
return this._super(params).then((model) => {
|
return this._super(params).then((model) => {
|
||||||
model.showAsCards =
|
model.showAsCards =
|
||||||
|
|
Loading…
Reference in New Issue