private handleCollapse()

in fuse-ui-fabric/tree/treeView.tsx [290:305]


  private handleCollapse() {
    if (this.selected != null) {
      if (this.selected.node.type === 'container') {
        // collapse the container if expanded
        if (this.selected.expanded) {
          this.selected.collapse();
        }
      } else {
        const parent = this.selected.parent;
        if (!this.props.hideRoot || this.root !== parent) {
          this.select(parent);
          parent.collapse();
        }
      }
    }
  }