<commit_before>import React, { Component, PropTypes } from 'react';
import Const from './Const';
import classSet from 'classnames';

class TableFilter extends Component {

  constructor(props) {
    super(props);
    this.filterObj = {};
    this.handleKeyUp.bind(this);
  }

  handleKeyUp(e) {
    const { value, name } = e.currentTarget;
    if (value.trim() === '') {
      delete this.filterObj[name];
    } else {
      this.filterObj[name] = value;
    }
    this.props.onFilter(this.filterObj);
  }

  render() {
    const { striped, condensed, rowSelectType, columns } = this.props;
    const tableClasses = classSet('table', {
      'table-striped': striped,
      'table-condensed': condensed
    });
    let selectRowHeader = null;

    if (rowSelectType === Const.ROW_SELECT_SINGLE ||
        rowSelectType === Const.ROW_SELECT_MULTI) {<commit_msg>fix this issue in handleKeyUp<commit_after>import React, { Component, PropTypes } from 'react';
import Const from './Const';
import classSet from 'classnames';

class TableFilter extends Component {

  constructor(props) {
    super(props);
    this.filterObj = {};
  }

  handleKeyUp = e => {
    const { value, name } = e.currentTarget;
    if (value.trim() === '') {
      delete this.filterObj[name];
    } else {
      this.filterObj[name] = value;
    }
    this.props.onFilter(this.filterObj);
  }

  render() {
    const { striped, condensed, rowSelectType, columns } = this.props;
    const tableClasses = classSet('table', {
      'table-striped': striped,
      'table-condensed': condensed
    });
    let selectRowHeader = null;

    if (rowSelectType === Const.ROW_SELECT_SINGLE ||
        rowSelectType === Const.ROW_SELECT_MULTI) {
{'fraction_non_alphanumeric': 0.13708260105448156, 'fraction_numerical': 0.0, 'mean_word_length': 3.1965601965601964, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7014183', 'n_tokens_mistral': 531, 'n_tokens_neox': 522, 'n_words': 118}