material-ui-data-table

1.0.6 • Public • Published

material-ui-data-table

material-ui table with sorting and pagination goodness

styled with prettier XO code style

usage

import debug from 'debug'
import React from 'react'
import Paper from 'material-ui/Paper'
// import DataTable from '../shared/mui/data-table'
import DataTable from 'material-ui-data-table'
 
const dbg = debug('app:people:results')
 
const columns = [
  {id: 'ssn'},
  {id: 'fullName'},
  {id: 'firstName'},
  {id: 'lastName'},
  {id: 'dateOfBirth', label: 'birth date'},
  {id: 'phoneNumber'},
  {id: 'address'},
  {id: 'city'},
  {id: 'state'},
  {id: 'zip'}
]
 
const results = props => {
  dbg('render: props=%o', props)
  const {page, onSort, onPage} = props
 
  return (
    <Paper elevation={5}>
      <DataTable columns={columns} page={page} onSort={onSort} onPage={onPage} />
    </Paper>
  )
}
 
export default results

screen-shot

data-table

credits/dependencies

special thanks to the guys at ultimate-pagination

Readme

Keywords

none

Package Sidebar

Install

npm i material-ui-data-table

Weekly Downloads

0

Version

1.0.6

License

MIT

Last publish

Collaborators

  • tony-kerz