<commit_before>/*global module: false, require: false, console: false */
'use strict';

var React = require('react');
var _ = require('underscore');
var DataTable = require('react-data-components').DataTable;
var DataGrid = require('react-datagrid');
require('react-datagrid/index.css');
require('react-data-components/css/table-twbs.css');

var VariantTable = React.createClass({
	onSortChange: function (info) {
		var [{prop}] = info, {data} = this.state;
		this.setState({data: _.sortBy(data, r => r[prop])});
	},
	render: function () {
		var {data, ...opts} = this.props,
			columns = [
				{title: 'Gene', prop: 'Gene symbol'},
				{title: '  HGVS  ', prop: 'HGVS'},
				{title: 'Pathogenicity', prop: 'Clinical significance'},
				{title: 'Allele origin', prop: 'Allele origin'},
				{title: 'CVA', prop: 'ClinVarAccession'}
			];
		return (
			<DataTable
				{...opts}
				columns={columns}
				initialData={data}
				initialPageLength={5}
                initialSortBy={{ title: 'Gene', prop: 'Gene', order: 'descending' }}
                pageLengthOptions={[ 10, 50, 100 ]}
                keys={['id']}
            />
		);
	}
});


module.exports = VariantTable;<commit_msg>add initial page size to 10<commit_after>/*global module: false, require: false, console: false */
'use strict';

var React = require('react');
var _ = require('underscore');
var DataTable = require('react-data-components').DataTable;
var DataGrid = require('react-datagrid');
require('react-datagrid/index.css');
require('react-data-components/css/table-twbs.css');

var VariantTable = React.createClass({
	onSortChange: function (info) {
		var [{prop}] = info, {data} = this.state;
		this.setState({data: _.sortBy(data, r => r[prop])});
	},
	render: function () {
		var {data, ...opts} = this.props,
			columns = [
				{title: 'Gene', prop: 'Gene symbol'},
				{title: '  HGVS  ', prop: 'HGVS'},
				{title: 'Pathogenicity', prop: 'Clinical significance'},
				{title: 'Allele origin', prop: 'Allele origin'},
				{title: 'CVA', prop: 'ClinVarAccession'}
			];
		return (
			<DataTable
				{...opts}
				columns={columns}
				initialData={data}
				initialPageLength={10}
                initialSortBy={{ title: 'Gene', prop: 'Gene', order: 'descending' }}
                pageLengthOptions={[ 10, 50, 100 ]}
                keys={['id']}
            />
		);
	}
});


module.exports = VariantTable;
{'fraction_non_alphanumeric': 0.18532494758909854, 'fraction_numerical': 0.007966457023060796, 'mean_word_length': 3.4022140221402215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '2836251', 'n_tokens_mistral': 893, 'n_tokens_neox': 776, 'n_words': 180}