<commit_before>'use strict';

var React = require('react');

var MenuControl = require('mixin/MenuControl');

var NavMenu = React.createClass({
  mixins : [
    require('mixin/MenuControl')
  ],

  propTypes : {
    text : React.PropTypes.string.isRequired,
    icon : React.PropTypes.string
  },

  render : function () {
    var display = !!this.props.icon ?
      (<span><i className={'fa fa-lg ' + this.props.icon}></i>&ensp;{this.props.text}</span>) :
      (<span>{this.props.text}</span>);

    return (
      <a onClick={this._toggleMenu} onBlur={this._onBlur} tabIndex='-1'>
        {display}&emsp;<i className='fa fa-chevron-down'></i>
      </a>
    );
  },

  componentDidUpdate : function () {
    if (this.state.open) {
      React.findDOMNode(this).focus();
    }
  },

  _onBlur : function () {
    this.setState({ open : false });
  }

});

module.exports = NavMenu;<commit_msg>Remove the blur handler for now<commit_after>'use strict';

var React = require('react');

var MenuControl = require('mixin/MenuControl');

var NavMenu = React.createClass({
  mixins : [
    require('mixin/MenuControl')
  ],

  propTypes : {
    text : React.PropTypes.string.isRequired,
    icon : React.PropTypes.string
  },

  render : function () {
    var display = !!this.props.icon ?
      (<span><i className={'fa fa-lg ' + this.props.icon}></i>&ensp;{this.props.text}</span>) :
      (<span>{this.props.text}</span>);

    return (
      <a onClick={this._toggleMenu} onBlur={this._onBlur} tabIndex='-1'>
        {display}&emsp;<i className='fa fa-chevron-down'></i>
      </a>
    );
  },

});

module.exports = NavMenu;
{'fraction_non_alphanumeric': 0.18646153846153846, 'fraction_numerical': 0.0012307692307692308, 'mean_word_length': 3.1374045801526718, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5081051', 'n_tokens_mistral': 567, 'n_tokens_neox': 553, 'n_words': 92}