mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-19 08:20:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8e5188d94 | ||
|
|
8c79bf95df | ||
|
|
6053c48781 | ||
|
|
8f1c8774f2 | ||
|
|
d5795fb5ac | ||
|
|
8abbefa680 | ||
|
|
4db644941a | ||
|
|
6905ccae72 | ||
|
|
e832bf52b0 | ||
|
|
3432fefce2 |
@@ -1,10 +1,14 @@
|
||||

|
||||
<div align="center">
|
||||
<a href="https://github.com/tannerlinsley/react-table"><img src="https://github.com/tannerlinsley/react-table/raw/master/media/Banner.png" alt="React Table Logo" style="width:450px;"/></a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
</div>
|
||||
|
||||
# react-table
|
||||
A fast, lightweight, opinionated table and datagrid built on React
|
||||
|
||||
[](https://travis-ci.org/tannerlinsley/react-table)
|
||||
[](https://react-table-slack.herokuapp.com/)
|
||||
[](https://travis-ci.org/tannerlinsley/react-table) []() [](https://react-table-slack.herokuapp.com/) []() [](https://twitter.com/tannerlinsley)
|
||||
|
||||
## Features
|
||||
|
||||
@@ -86,6 +90,7 @@ These are the default props for the main react component `<ReactTable />`
|
||||
pageSize: 20, // The default page size (this can be changed by the user if `showPageSizeOptions` is enabled)
|
||||
minRows: 0, // Ensure this many rows are always rendered, regardless of rows on page
|
||||
showPagination: true, // Shows or hides the pagination component
|
||||
showPageJump: true, // Shows or hides the pagination number input
|
||||
showPageSizeOptions: true, // Enables the user to change the page size
|
||||
pageSizeOptions: [5, 10, 20, 25, 50, 100], // The available page size options
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
"stylus": "^0.54.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"jumpsuit": "^0.7.5",
|
||||
"jumpsuit": "^1.3.3",
|
||||
"lodash": "^4.16.4",
|
||||
"namor": "^0.3.0",
|
||||
"react-syntax-highlighter": "^3.0.0",
|
||||
"react-table": "^2.0.0"
|
||||
"react-table": "^3.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ global-reset()
|
||||
// vendor styles
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@import '../../src/index'
|
||||
@import '../node_modules/react-table/src/index'
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// variables
|
||||
@@ -84,7 +84,7 @@ strong
|
||||
display:block
|
||||
padding: 10px
|
||||
margin: 5px
|
||||
background: alpha(black, .7)
|
||||
background: alpha(black, .4)
|
||||
color: white
|
||||
border-radius: 3px
|
||||
transition: all .2s ease-out
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import namor from 'namor'
|
||||
|
||||
import CodeHighlight from 'components/codeHighlight'
|
||||
import ReactTable from '../../../lib/index.js'
|
||||
import ReactTable from 'react-table'
|
||||
|
||||
// Let's mock some data to play around with
|
||||
const rawData = _.map(_.range(3424), d => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash'
|
||||
import namor from 'namor'
|
||||
|
||||
import CodeHighlight from 'components/codeHighlight'
|
||||
import ReactTable from '../../../lib/index.js'
|
||||
import ReactTable from 'react-table'
|
||||
|
||||
export default Component({
|
||||
render () {
|
||||
|
||||
+2741
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-table",
|
||||
"version": "3.1.2",
|
||||
"version": "3.1.4",
|
||||
"description": "A fast, lightweight, opinionated table and datagrid built on React",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/tannerlinsley/react-table#readme",
|
||||
@@ -16,6 +16,7 @@
|
||||
],
|
||||
"main": "lib/index.js",
|
||||
"files": [
|
||||
"src/",
|
||||
"lib/",
|
||||
"react-table.js",
|
||||
"react-table.css",
|
||||
|
||||
+2
-2
@@ -163,7 +163,7 @@ export default React.createClass({
|
||||
: Math.ceil(this.props.data.length / this.getStateOrProp('pageSize'))
|
||||
},
|
||||
getMinRows () {
|
||||
return _.getFirstDefined(this.props.minRows, this.props.pageSize)
|
||||
return _.getFirstDefined(this.props.minRows, this.getStateOrProp('pageSize'))
|
||||
},
|
||||
render () {
|
||||
// Build Columns
|
||||
@@ -378,7 +378,7 @@ export default React.createClass({
|
||||
{...rowInfo}
|
||||
value={rowInfo.rowValues[column.id]}
|
||||
/>
|
||||
) : typeof Cell !== 'undefined' ? Cell
|
||||
) : typeof Cell !== 'undefined' ? Cell
|
||||
: rowInfo.rowValues[column.id]}
|
||||
</div>
|
||||
</TdComponent>
|
||||
|
||||
+2
-2
@@ -42,8 +42,8 @@ export default React.createClass({
|
||||
onPageSizeChange
|
||||
} = this.props
|
||||
|
||||
const PreviousComponent = this.props.PreviousComponent || defaultButton
|
||||
const NextComponent = this.props.NextComponent || defaultButton
|
||||
const PreviousComponent = this.props.previousComponent || defaultButton
|
||||
const NextComponent = this.props.nextComponent || defaultButton
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user