mirror of
https://github.com/gosticks/react-table.git
synced 2026-08-19 08:20:30 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6053c48781 | ||
|
|
8f1c8774f2 | ||
|
|
d5795fb5ac | ||
|
|
8abbefa680 | ||
|
|
4db644941a | ||
|
|
6905ccae72 | ||
|
|
e832bf52b0 | ||
|
|
3432fefce2 | ||
|
|
2abcc86954 | ||
|
|
610972d99e | ||
|
|
c99796342b | ||
|
|
1b4d8bd45f | ||
|
|
e922a43741 | ||
|
|
75317c2251 | ||
|
|
e531ef1f64 |
+1
-2
@@ -3,5 +3,4 @@ lib/
|
||||
react-table.js
|
||||
react-table.css
|
||||
*.log
|
||||
|
||||
dist/
|
||||
example/dist/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
Vendored
-171
File diff suppressed because one or more lines are too long
Vendored
-59138
File diff suppressed because one or more lines are too long
Vendored
-13
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>React-Table Demo</title>
|
||||
<link rel="stylesheet" href="/app.css" charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script src="/app.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -12,4 +12,6 @@ Render(null, (
|
||||
<Route path='server-side' component={ServerSide} />
|
||||
</Route>
|
||||
</Router>
|
||||
))
|
||||
), {
|
||||
useHash: false
|
||||
})
|
||||
|
||||
@@ -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 => {
|
||||
@@ -106,6 +106,7 @@ export default Component({
|
||||
function getCode () {
|
||||
return `
|
||||
import ReactTable from 'react-table'
|
||||
import Axios from 'axios'
|
||||
|
||||
export default React.creatClass({
|
||||
getInitialState () {
|
||||
|
||||
@@ -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
+5
-1
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"name": "react-table",
|
||||
"root": "dist"
|
||||
"root": "dist",
|
||||
"routes": [{
|
||||
"src": "/**",
|
||||
"dest": "index.html"
|
||||
}]
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-table",
|
||||
"version": "3.1.0",
|
||||
"version": "3.1.3",
|
||||
"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",
|
||||
|
||||
+1
-1
@@ -416,7 +416,7 @@ export default React.createClass({
|
||||
})}
|
||||
</TbodyComponent>
|
||||
</TableComponent>
|
||||
{this.props.showPagination && pagesLength > 1 && (
|
||||
{this.props.showPagination && (
|
||||
<Pagination
|
||||
currentPage={currentPage}
|
||||
pagesLength={pagesLength}
|
||||
|
||||
+8
-1
@@ -160,6 +160,12 @@ $easeOutBack = cubic-bezier(0.175, 0.885, 0.320, 1.275)
|
||||
.-center
|
||||
flex: 1.5
|
||||
text-align:center
|
||||
margin-bottom:0
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
align-items: center
|
||||
justify-content: space-around
|
||||
|
||||
.-pageInfo
|
||||
display: inline-block
|
||||
@@ -173,7 +179,7 @@ $easeOutBack = cubic-bezier(0.175, 0.885, 0.320, 1.275)
|
||||
text-align:center
|
||||
|
||||
.-pageSizeOptions
|
||||
margin-left:12px
|
||||
margin:0 10px 3px
|
||||
|
||||
|
||||
.-loading
|
||||
@@ -211,6 +217,7 @@ $easeOutBack = cubic-bezier(0.175, 0.885, 0.320, 1.275)
|
||||
select
|
||||
appearance: none
|
||||
border: 1px solid rgba(0,0,0,0.1)
|
||||
background: white
|
||||
padding: 5px 7px
|
||||
font-size: inherit
|
||||
border-radius: 3px
|
||||
|
||||
+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