mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-19 08:20:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd433f7d9c | ||
|
|
0daffaf08d |
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import namor from 'namor'
|
||||
|
||||
import CodeHighlight from 'components/codeHighlight'
|
||||
import ReactTable from 'react-table'
|
||||
import ReactTable from '../../../lib/index'
|
||||
|
||||
export default Component({
|
||||
render () {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-table",
|
||||
"version": "3.2.0",
|
||||
"version": "3.2.1",
|
||||
"description": "A fast, lightweight, opinionated table and datagrid built on React",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/tannerlinsley/react-table#readme",
|
||||
|
||||
+6
-2
@@ -16,6 +16,7 @@ export const ReactTableDefaults = {
|
||||
showPageJump: true,
|
||||
// Callbacks
|
||||
onChange: () => null,
|
||||
onTrClick: () => null,
|
||||
// Classes
|
||||
className: '-striped -highlight',
|
||||
tableClassName: '',
|
||||
@@ -23,7 +24,6 @@ export const ReactTableDefaults = {
|
||||
tbodyClassName: '',
|
||||
trClassName: '',
|
||||
trClassCallback: d => null,
|
||||
onTrClick: () => null,
|
||||
thClassName: '',
|
||||
thGroupClassName: '',
|
||||
tdClassName: '',
|
||||
@@ -72,6 +72,7 @@ export const ReactTableDefaults = {
|
||||
)
|
||||
},
|
||||
tdComponent: (props) => <td {...props}>{props.children}</td>,
|
||||
paginationComponent: Pagination,
|
||||
previousComponent: null,
|
||||
nextComponent: null,
|
||||
loadingComponent: props => (
|
||||
@@ -246,6 +247,7 @@ export default React.createClass({
|
||||
const canPrevious = currentPage > 0
|
||||
const canNext = currentPage + 1 < pagesLength
|
||||
|
||||
const PaginationComponent = this.props.paginationComponent
|
||||
const TableComponent = this.props.tableComponent
|
||||
const TheadComponent = this.props.theadComponent
|
||||
const TbodyComponent = this.props.tbodyComponent
|
||||
@@ -422,7 +424,7 @@ export default React.createClass({
|
||||
</TbodyComponent>
|
||||
</TableComponent>
|
||||
{this.props.showPagination && (
|
||||
<Pagination
|
||||
<PaginationComponent
|
||||
currentPage={currentPage}
|
||||
pagesLength={pagesLength}
|
||||
pageSize={pageSize}
|
||||
@@ -441,6 +443,8 @@ export default React.createClass({
|
||||
//
|
||||
onChange={this.setPage}
|
||||
onPageSizeChange={this.setPageSize}
|
||||
//
|
||||
className={this.props.paginationClassName}
|
||||
/>
|
||||
)}
|
||||
<LoadingComponent {...this.props} />
|
||||
|
||||
+3
-2
@@ -39,7 +39,8 @@ export default React.createClass({
|
||||
showPageJump,
|
||||
canPrevious,
|
||||
canNext,
|
||||
onPageSizeChange
|
||||
onPageSizeChange,
|
||||
className
|
||||
} = this.props
|
||||
|
||||
const PreviousComponent = this.props.previousComponent || defaultButton
|
||||
@@ -47,7 +48,7 @@ export default React.createClass({
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classnames(this.props.paginationClassName, '-pagination')}
|
||||
className={classnames(className, '-pagination')}
|
||||
style={this.props.paginationStyle}
|
||||
>
|
||||
<div className='-previous'>
|
||||
|
||||
Reference in New Issue
Block a user