1.2.7 • Published 5 years ago

react-table-grid v1.2.7

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

react-table-grid

external library

NPM JavaScript Style Guide

Install

npm install --save react-table-grid

Usage

import React, { Component } from 'react'

import TableGrid from 'react-table-grid'

const mockData = [
  { data: { foo: 'bar' } },
];

class Example extends Component {
  render () {
    return (
      <TableGrid
            data={mockData}
            renderColumns={{
                index: {
                   value: (value, idx, row) => { return idx + 1 },
                   name: '#',
                },
                foo: {
                   value: null, //if it's null then value from data will be taken
                   name: 'Value',
                },                
            }}
            renderChildTitle={false}
            renderChildHeaders={false}            
            paginateBy={15}
          />
    )
  }
}

Props

Common props you may want to specify include:

  • data - data Array
  • className - apply a className to the control
  • renderColumns - an object with render methods for every column; columns will be rendered according to order of keys
  • renderChildTitle - to render a title for child tables
  • renderChildHeaders - to render column headers for child tables
  • collapseRow - subscribe to collapse events

** pagination props according to https://github.com/AdeleD/react-paginate#readme

License

MIT © Mikhe

1.2.7

5 years ago

1.2.6

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago