0.5.1 • Published 5 years ago

material-ui-next-responsive-table v0.5.1

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

material-ui-next-responsive-table

npm Package

This project provides read-only responsive table for Material-UI.

Table is shown for desktop screen, list of expandable items - for tablet and mobile.

Demo

Installation

npm i --save material-ui-next-responsive-table

Usage

import ResponsiveTable from 'material-ui-next-responsive-table'

const columns = [
  {
    key: 'id',
    label: 'ID',
    primary: true,
  },
  {
    key: 'name',
    label: 'Name',
  },
  {
    key: 'authors',
    label: 'Author(s)',
    render: (value) => value.join(', ')
  },
]

const data = [
  {
    id: '1234',
    name: 'Foo',
    authors: ['Andy'],
  },
  {
    id: '4567',
    name: 'Bar',
    authors: ['Joe', 'Mike'],
  }
]

<ResponsiveTable
  columns={columns}
  data={data}
/>

ResponsiveTable Properties

NameTypeDefaultDescription
columnsarrayArray of objects with Required column id (key) - used for detecting value for body cells Required column name (name) - shown in table header Optional render function (render: (value, column, row, data)) - allows to customize cell value for all cells in specific column Optional primary boolean (primary) - detects the column, which value has to be shown in the expandable list item summary (can be marked for 2 or more columns - in summary they are divided by .
dataarrayArray of objects with keys that corresponds column id and value that should be shown in cell.
noContentTextstring'No Content'Override the default text if no columns/rows presented.

License

The files included in this repository are licensed under the MIT license.

0.5.1

5 years ago

0.5.0

5 years ago

0.4.9

5 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.3.1

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago