diff --git a/javascripts/discourse/initializers/user-card-directory.js b/javascripts/discourse/initializers/user-card-directory.js index 8356f10..42f1292 100644 --- a/javascripts/discourse/initializers/user-card-directory.js +++ b/javascripts/discourse/initializers/user-card-directory.js @@ -108,6 +108,14 @@ export default { userCardShowUser(user) { DiscourseURL.routeTo(userPath(user.username_lower)); }, + + @action + updateOrder(field, asc) { + this.setProperties({ + order: field, + asc, + }); + }, }); }); }, diff --git a/javascripts/discourse/templates/users-as-card-directory.hbs b/javascripts/discourse/templates/users-as-card-directory.hbs index a038891..c5f02b1 100644 --- a/javascripts/discourse/templates/users-as-card-directory.hbs +++ b/javascripts/discourse/templates/users-as-card-directory.hbs @@ -100,6 +100,7 @@