import React from 'react' import _ from 'lodash' import namor from 'namor' import CodeHighlight from './components/codeHighlight' import ReactTable from '../src/index' class SubComponents extends React.Component { constructor(props) { super(props) const data = _.map(_.range(5553), d => { return { firstName: namor.generate({words: 1, numLen: 0}), lastName: namor.generate({words: 1, numLen: 0}), age: Math.floor(Math.random() * 30) } }) this.state = { tableOptions: { loading: false, showPagination: true, showPageSizeOptions: true, showPageJump: true, collapseOnSortingChange: true, collapseOnPageChange: true, collapseOnDataChange: true, freezeWhenExpanded: false }, data: data } this.setTableOption = this.setTableOption.bind(this); } render() { const columns = [{ header: 'Name', columns: [{ header: 'First Name', accessor: 'firstName' }, { header: 'Last Name', id: 'lastName', accessor: d => d.lastName }] }, { header: 'Info', columns: [{ header: 'Age', accessor: 'age' }] }] return (
| {optionKey} |