<commit_before>import React from 'react';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn, TableFooter } from 'material-ui/Table';

import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';

import Paper from 'material-ui/Paper';

import FilterList from 'material-ui/svg-icons/content/filter-list';
import SearchIcon from 'material-ui/svg-icons/action/search';
import NavigateRight from 'material-ui/svg-icons/image/navigate-next';
import NavigateLeft from 'material-ui/svg-icons/image/navigate-before';

import injectProp from '../utils/injectProp';
import { hasHtml, extractHtml } from '../utils/handleHtmlProp';
import { hasCustomRender, callCustomRender } from '../utils/handleCustomRender';
import arraySearch from '../utils/search.js';
import Paginate from '../utils/paginate';

const iconStyleFilter = {
  color: '#757575',
  cursor: 'pointer',
  transform: 'translateY(5px) translateX(-20px)'
};

const searchHeaderColumnStyle = {
  position: 'relative',
  textAlign: 'right'
};

const searchStyle = {
  color: '#777777',
  opacity: 0,
  transitionDuration: '0.6s',
  transitionProperty: 'opacity',
  border: 0,
  outline: 0,
  fontSize: 16,
  width: '100%',
  marginLeft: -22,
  padding: '7px 12px',
  textIndent: 3,
  cursor: 'text'
};

const iconStyleSearch = {
  color: '#757575',
  position: 'absolute',
  top: '30%',
  opacity: 0,
  marginLeft: -76
};

const navigationStyle = {
  cursor: 'pointer'
};

export default class MuiDataTable extends React.Component {
  constructor(props) {
    super();
    let tableData = props.config.data || [];
    let rowsPerPage = props.config.paginated.constructor === Object ? props.config.paginated.rowsPerPage : 5;
    let viewSearchBarOnload  = props.config.viewSearchBarOnload || false;

    tableData = props.config.paginated ? new Paginate(tableData).perPage(rowsPerPage) : tableData;

    if (tableData instanceof Paginate) {
      tableData = tableData.page(1);
    }

    this.state = {
      disabled: true,
      style: viewSearchBarOnload ? {...searchStyle, opacity: 1} : searchStyle,
      idempotentData: props.config.data,
      paginatedIdempotentData: new Paginate(props.config.data),
      perPageSelection: props.config.paginated.rowsPerPage || 5,
      tableData: tableData,
      searchData: [],
      isSearching: false,<commit_msg>[ft-extend-config] fix a small bug where the search bar loads but the user cannot search<commit_after>import React from 'react';
import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn, TableFooter } from 'material-ui/Table';

import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';

import Paper from 'material-ui/Paper';

import FilterList from 'material-ui/svg-icons/content/filter-list';
import SearchIcon from 'material-ui/svg-icons/action/search';
import NavigateRight from 'material-ui/svg-icons/image/navigate-next';
import NavigateLeft from 'material-ui/svg-icons/image/navigate-before';

import injectProp from '../utils/injectProp';
import { hasHtml, extractHtml } from '../utils/handleHtmlProp';
import { hasCustomRender, callCustomRender } from '../utils/handleCustomRender';
import arraySearch from '../utils/search.js';
import Paginate from '../utils/paginate';

const iconStyleFilter = {
  color: '#757575',
  cursor: 'pointer',
  transform: 'translateY(5px) translateX(-20px)'
};

const searchHeaderColumnStyle = {
  position: 'relative',
  textAlign: 'right'
};

const searchStyle = {
  color: '#777777',
  opacity: 0,
  transitionDuration: '0.6s',
  transitionProperty: 'opacity',
  border: 0,
  outline: 0,
  fontSize: 16,
  width: '100%',
  marginLeft: -22,
  padding: '7px 12px',
  textIndent: 3,
  cursor: 'text'
};

const iconStyleSearch = {
  color: '#757575',
  position: 'absolute',
  top: '30%',
  opacity: 0,
  marginLeft: -76
};

const navigationStyle = {
  cursor: 'pointer'
};

export default class MuiDataTable extends React.Component {
  constructor(props) {
    super();
    let tableData = props.config.data || [];
    let rowsPerPage = props.config.paginated.constructor === Object ? props.config.paginated.rowsPerPage : 5;
    let viewSearchBarOnload  = props.config.viewSearchBarOnload || false;

    tableData = props.config.paginated ? new Paginate(tableData).perPage(rowsPerPage) : tableData;

    if (tableData instanceof Paginate) {
      tableData = tableData.page(1);
    }

    this.state = {
      disabled: viewSearchBarOnload ? false : true,
      style: viewSearchBarOnload ? {...searchStyle, opacity: 1} : searchStyle,
      idempotentData: props.config.data,
      paginatedIdempotentData: new Paginate(props.config.data),
      perPageSelection: props.config.paginated.rowsPerPage || 5,
      tableData: tableData,
      searchData: [],
      isSearching: false,
{'fraction_non_alphanumeric': 0.12913839193913224, 'fraction_numerical': 0.018918363150318734, 'mean_word_length': 4.292709466811752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5185198', 'n_tokens_mistral': 1565, 'n_tokens_neox': 1489, 'n_words': 368}