<commit_before>import React, { Component } from 'react';
import { withRouter } from 'react-router';
import { ErrorSection } from 'src/components/common';
import EntityTableEditor from './EntityTableEditor';
import EntityTableViewer from './EntityTableViewer';

class EntityTable extends Component {
  sortColumn(newField) {
    const { query, updateQuery } = this.props;
    const { field: currentField, direction } = query.getSort();

    // Toggle through sorting states: ascending, descending, or unsorted.
    if (currentField !== newField) {
      return updateQuery(query.sortBy(newField, 'asc'));
    }
    if (direction === 'asc') {
      updateQuery(query.sortBy(currentField, 'desc'));
    } else {
      updateQuery(query.sortBy(currentField, undefined));
    }
    return undefined;
  }

  render() {
    const { collection, isEditing, query, result, ...rest } = this.props;


    if (result.isError) {
      return <ErrorSection error={result.error} />;
    }

    if (!result.isPending && result.total === 0 && result.page === 1 && !isEditing) {
      return null;
    }

    const results = result.results ? result.results.filter((e) => e.id !== undefined) : [];
    const sort = query.getSort();
    const TableComponent = isEditing ? EntityTableEditor : EntityTableViewer;

    return (
      <TableComponent
        collection={collection}
        onStatusChange={this.onStatusChange}
        entities={results}
        sort={sort}
        isPending={result.isPending}
        sortColumn={this.sortColumn.bind(this)}
        {...rest}
      />
    )
  }
}

export default withRouter(EntityTable);<commit_msg>set entity table status change handler to placeholder<commit_after>import React, { Component } from 'react';
import { withRouter } from 'react-router';
import { ErrorSection } from 'src/components/common';
import EntityTableEditor from './EntityTableEditor';
import EntityTableViewer from './EntityTableViewer';

class EntityTable extends Component {
  sortColumn(newField) {
    const { query, updateQuery } = this.props;
    const { field: currentField, direction } = query.getSort();

    // Toggle through sorting states: ascending, descending, or unsorted.
    if (currentField !== newField) {
      return updateQuery(query.sortBy(newField, 'asc'));
    }
    if (direction === 'asc') {
      updateQuery(query.sortBy(currentField, 'desc'));
    } else {
      updateQuery(query.sortBy(currentField, undefined));
    }
    return undefined;
  }

  render() {
    const { collection, isEditing, query, result, ...rest } = this.props;


    if (result.isError) {
      return <ErrorSection error={result.error} />;
    }

    if (!result.isPending && result.total === 0 && result.page === 1 && !isEditing) {
      return null;
    }

    const results = result.results ? result.results.filter((e) => e.id !== undefined) : [];
    const sort = query.getSort();
    const TableComponent = isEditing ? EntityTableEditor : EntityTableViewer;

    return (
      <TableComponent
        collection={collection}
        onStatusChange={() => null}
        entities={results}
        sort={sort}
        isPending={result.isPending}
        sortColumn={this.sortColumn.bind(this)}
        {...rest}
      />
    )
  }
}

export default withRouter(EntityTable);
{'fraction_non_alphanumeric': 0.13432835820895522, 'fraction_numerical': 0.0012183978068839476, 'mean_word_length': 3.18343949044586, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, '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': '5099001', 'n_tokens_mistral': 941, 'n_tokens_neox': 923, 'n_words': 221}