private renderContextMenu()

in fuse-ui-fabric/tree/treeView.tsx [105:124]


  private renderContextMenu(): JSX.Element {
    if (this.props.readonly) {
      return null;
    }

    const target = this.state.contextTarget || (this.selected && this.selected.elementRef);
    if (!this.state.contextVisible || !target) {
      return null;
    }

    return (
      <ContextualMenu
        target={target}
        isBeakVisible={false}
        items={this.contextMenuItems}
        onItemClick={this.handleContextMenu}
        onDismiss={this.dismissContextMenu}
      />
    );
  }