<commit_before>let React = require("react")
let cx = require("classnames")

let {
  saveList,
  errorList,
  sizeClassNames,
  formGroupCx,
  label,
} = require("../util.js")
let select = React.createFactory(require("frig").ValueLinkedSelect)

export default class Select extends React.Component {
  displayName = "FriggingBootstrap.Select"

  static defaultProps = require("../default_props.js")

  _inputHtml() {
    return Object.assign({}, this.props.inputHtml, {
      key: "input",
      className: "form-control",
      valueLink: this.props.valueLink,
      options: this.props.options,
    })
  }

  render() {
    return (
      <div className={cx(sizeClassNames(this.props))}>
        <div className={formGroupCx(this.props)}>
          {label(this.props, {className:""})}
          <div className="controls">
            {select(this._inputHtml())}
            {errorList(this.props.errors)}
          </div>
          {saveList(this.props.saved)}
        </div><commit_msg>Lint Select Component<commit_after>import React from 'react'
import cx from 'classnames'
import {
  saveList,
  errorList,
  sizeClassNames,
  formGroupCx,
  label,
} from '../util.js'

import { ValueLinkedSelect } from 'frig'

export default class Select extends React.Component {
  static displayName = 'FriggingBootstrap.Select'

  static defaultProps = Object.assign({}, require('../default_props.js'), {
    options: {},
  })

  static propTypes = {
    inputHtml: React.PropTypes.shape({
      type: React.PropTypes.string.isRequired,
    }).isRequired,
    options: React.PropTypes.object,
    valueLink: React.PropTypes.shape({
      value: React.PropTypes.oneOfType([
        React.PropTypes.string,
        React.PropTypes.number,
        React.PropTypes.bool,
      ]),
      requestChange: React.PropTypes.func,
    }).isRequired,

    saved: React.PropTypes.bool,
    errors: React.PropTypes.array,
  }

  _inputHtml() {
    return Object.assign({}, this.props.inputHtml, {
      key: 'input',
      className: 'form-control',
      valueLink: this.props.valueLink,
      options: this.props.options,
    })
  }

  render() {
    return (
      <div className={cx(sizeClassNames(this.props))}>
        <div className={formGroupCx(this.props)}>
          {
            label(this.props, { className: '' })
          }
          <div className="controls">
            <ValueLinkedSelect {...this._inputHtml()} />
            {errorList(this.props.errors)}
          </div>
          {saveList(this.props.saved)}
        </div>
{'fraction_non_alphanumeric': 0.14189456995640112, 'fraction_numerical': 0.0, 'mean_word_length': 2.75037147102526, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, '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': '4024598', 'n_tokens_mistral': 771, 'n_tokens_neox': 761, 'n_words': 140}