How to use the react-table.default function in react-table

To help you get started, we’ve selected a few react-table examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github idyll-lang / idyll / packages / idyll-components / src / table.js View on Github external
const React = require('react');
const Table = require('react-table').default;

class TableComponent extends React.PureComponent {
  getColumns() {
    if (this.props.columns) {
      if (
        this.props.columns.length &&
        typeof this.props.columns[0] === 'string'
      ) {
        return this.props.columns.map(d => {
          return {
            Header: d,
            accessor: d
          };
        });
      }
github voteamerica / voteamerica.github.io / webpack / components / Table.bs.js View on Github external
function make(props, className, type_, defaultPageSize, page, pageSize, columns, data, onPageChange, onPageSizeChange, getTdProps, children) {
  return ReasonReact.wrapJsForReason(ReactTable.default, Curry.app(props, [
                  className,
                  type_,
                  columns,
                  defaultPageSize,
                  page,
                  pageSize,
                  data,
                  onPageChange,
                  onPageSizeChange,
                  getTdProps
                ]), children);
}