Hide group based on length of member parts

Hi

is it possible to bind the member parts length to group visibility, and hide groups that have no members?

You wonā€™t be able to use a binding, but you can set Group.memberAdded and Group.memberRemoved functions to handle the visibility.

Add this to your group template:

{
  visible: false,
  memberAdded: function(grp, part) {
    grp.visible = true;
  },
  memberRemoved: function(grp, part) {
    if (grp.memberParts.count <= 0) grp.visible = false;
  }
}

Example, notice Beta is not visible:

1 Like