pagination-material-ui
v1.0.7
Published
Pagination component for material-ui
Downloads
10
Readme
Pagination Component for material-ui
Usage
npm install --save pagination-material-ui
or
yarn add pagination-material-ui
import React, { Component } from 'react';
import { render } from 'react-dom';
import Pagination from 'pagination-material-ui'
class PaginationExample extends Component {
render() {
return (
<Pagination total={100} perPage={10} onChange={this.onChange.bind(this)}/>
)
}
onChange(currentPage, perPage) {
// Do some pagination thing here
}
}
render(<PaginationExample/>, document.getElementById('app'));
Available Props
total - Total rows count. Type: number - required perPage - Show rows count on per page. Type: number - required onChange - Callback for page change Type: function required
@currentPage
@perPage
texts - Localization text Type: object
{
page: 'Page: ',
perPage: 'Per Page: ',
showing: 'Showing {total} of {from} to {to}'
}