FEATURE: Add group filter to user directory (PR #13330)

Thanks this this commit, we already support filtering users by group Allow parameters for group and username filters on directory (#5815) · discourse/discourse@3cd4c82 · GitHub

GitHub

I wish I could just do

this.store.findAll("group").then((groups) => {
  this.set("groupsOptions", groups);
})

But groups is an arrayProxy and can’t be passed directly into a combo-box as options.

I noticed loadGroups and loadUsers are both promises. setupController will finish before both load, which might be what we want. In that case the page will start to render before data is available. Once it is, those parts of the page will re-render.

An alternative would be to return Promise.all with both promises, so the route will wait for both to resolve before continuing.

@eviltrout Not sure if I need another thumbs up, but I made the suggested change.