handleActionSelected()

in js/common/F8Header.js [171:188]


  handleActionSelected(position: number) {
    if (this.limitActionSelection) {
      return;
    }
    let items = this.props.extraItems || [];
    if (this.props.rightItem) {
      items = [this.props.rightItem, ...items];
    }
    if (this.props.leftItem) {
      items = [this.props.leftItem, ...items];
    }
    const item = items[position];
    item && item.onPress && item.onPress();
    this.limitActionSelection = true;
    setTimeout(() => {
      this.limitActionSelection = false;
    }, 1000);
  }