FilterTable
Extends:
react~React.Component → FilterTable
A material-ui Table with sorting and filtering.
const columns = [
{key: 'id', fieldName: 'Id', name: 'Id'},
{key: 'title', fieldName: 'Title', name: 'Tittel'},
]
const items = [
{Id: 23, Title: 'This one time...'},
{Id: 7, Title: 'Free lunch'},
]
<FilterTable
columns={columns}
items={items}
defaultSortBy={1}
onSelect={this.handleSelect}
/>
Member Summary
Public Members | ||
public |
filterAndSort(items: Object[], options: Object): Object[]: function |
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
|
|
public |
componentWillReceiveProps(nextProps: *) |
|
public |
render(): Node |
Static Public Members
public static propTypes: Object source
Properties:
Name | Type | Attribute | Description |
columns | [{key: string, fieldName: string, name: string}] | list of columns. |
|
items | Object[] | list of items. {<fieldName>: <value>} |
|
onSelect | function(selectedItem: Object) | callback function for selected item. |
|
defaultSortBy | number | which column index to default sort by. Default: 0. |