1.0.6 • Published 7 years ago

material-ui-data-table v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
7 years ago

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