<commit_before>import React, {Children} from "react";
import {withProps} from "recompose";
import {List} from "immutable";
import {ShallowCompare} from "../../libs/types";
import {getHTMLAttributes} from "../Form/Helpers/inputHelpers";
import {SelectInputProps} from "../Form/Types/types";
import {PerformanceWrapperProps} from "../Form/Helpers/performanceWrapper";

class SelectBase extends React.Component<SelectInputProps & PerformanceWrapperProps, {}> {
  displayName: 'SelectBase'
  
  handleChange = event => {
    const {inputChanged, onChange} = this.props;

    inputChanged(event.target.value);
    if(typeof onChange === 'function') {
      onChange(event);
    }
  }

  render () {
    const attributes = getHTMLAttributes(this.props);
    return (
      <select {...attributes} onChange={this.handleChange}>
        {this.props.children}
      </select>
    );
  }
}

export default SelectBase;<commit_msg>added onblur event<commit_after>import React, {Children} from "react";
import {withProps} from "recompose";
import {List} from "immutable";
import {ShallowCompare} from "../../libs/types";
import {getHTMLAttributes} from "../Form/Helpers/inputHelpers";
import {SelectInputProps} from "../Form/Types/types";
import {PerformanceWrapperProps} from "../Form/Helpers/performanceWrapper";

class SelectBase extends React.Component<SelectInputProps & PerformanceWrapperProps, {}> {
  displayName: 'SelectBase'
  
  handleChange = event => {
    const {inputChanged, onChange} = this.props;

    inputChanged(event.target.value);
    if(typeof onChange === 'function') {
      onChange(event);
    }
  }

  handleBlur = event => {
    const {onBlur} = this.props;

    if(typeof onBlur === 'function') {
      onBlur(event);
    }
  }

  render () {
    const attributes = getHTMLAttributes(this.props);
    return (
      <select {...attributes} onBlur={this.handleBlur} onChange={this.handleChange}>
        {this.props.children}
      </select>
    );
  }
}

export default SelectBase;
{'fraction_non_alphanumeric': 0.14507253626813407, 'fraction_numerical': 0.0, 'mean_word_length': 3.8661800486618003, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, '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': '6158549', 'n_tokens_mistral': 584, 'n_tokens_neox': 587, 'n_words': 131}