# material-ui-sortable-table

> Material UI Table with sorting functionality

Latest version **1.0.0** (published 2018-04-17) · 0 weekly downloads

## Install

```sh
npm install material-ui-sortable-table
pnpm add material-ui-sortable-table
yarn add material-ui-sortable-table
bun add material-ui-sortable-table
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-04-17 |
| First published | 2018-04-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | 8.9.0 |
| Dependencies | 6 |
| Unpacked size | 16.8 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 40 |
| Author | Vadym Orlov |
| Maintainers | krazyjakee |

## Links

- npm: https://www.npmjs.com/package/material-ui-sortable-table
- Repository: https://github.com/vorlov/material-ui-sortable-table
- Homepage: https://github.com/vorlov/material-ui-sortable-table#readme
- Issues: https://github.com/vorlov/material-ui-sortable-table/issues
- npm.io page: https://npm.io/package/material-ui-sortable-table

## Dependencies (6)

- [react](https://npm.io/package/react.md) 16.2.0
- [express](https://npm.io/package/express.md) 4.16.2
- [react-dom](https://npm.io/package/react-dom.md) 16.2.0
- [prop-types](https://npm.io/package/prop-types.md) 15.6.0
- [material-ui](https://npm.io/package/material-ui.md) 0.20.0
- [proxy-middleware](https://npm.io/package/proxy-middleware.md) 0.15.0

## Recent versions

- 1.0.0 (latest) — 2018-04-17

## README

# material-ui-sortable-table
Material UI Table component with sorting and pagination functionality

Example of usage
npm i
npm run dev
```javascript
<SmartTable
  isLoading={ false }
  data={ data }
  headers={ headers }
  limit={ 40 }
  total={ data.length }
/>
```

isLoading - the flag that indicates data loading, if true spinner will be shown.
Usually it's passed from any state container on request action.

example of tableHeaders
```javascript
const headers = [{
  alias: 'Name',
  sortable: true,
  dataAlias: 'name',
  format: {
    type: 'link',
    url: 'http://someurl'
  }
}, {
  alias: 'Status',
  sortable: true,
  dataAlias: 'status'
}, {
  alias: 'Birth Date',
  sortable: true,
  dataAlias: 'birthDate',
  format: {
    type: 'date'
  }
}];
```

alias - name of column in the column header <br />
sortable - show or not sortable icon in the column header <br />
dataAlias - property name of the object in the data array <br />
format - object that sets up any additional info about cell or custom formatting to cell in the row (Button, Link, etc) <br />

example of data
```javascript
[{
  name: 'John',
  status: 'Single',
  birthDate: '1 Jan 1966'
}, {
  name: 'David',
  status: 'Married',
  birthDate: '5 Feb 1914'
}]
```

For now that is custom solution and will be changed by build-in functionality in the future release of Material UI components library

---
_Source: https://npm.io/package/material-ui-sortable-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
