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:
Jarek Radosz 2024-06-19 14:12:21 +02:00 committed by GitHub
parent 1ef7e3e2b1
commit 36dd79a8c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 4 deletions

View File

@ -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 =