├── .gitignore
├── .mversionrc
├── .nvmrc
├── .travis.yml
├── CONTRIBUTING.md
├── README.md
├── bower.json
├── dist
├── react-table.js
└── react-table.min.js
├── examples
├── app.js
├── data
│ ├── names-since-2011.json
│ └── names-small.json
├── index.html
├── non-cjs.html
└── public
│ ├── app.css
│ ├── non-cjs.js
│ └── react-with-addons.js
├── gulpfile.js
├── index.js
├── karma.conf.js
├── package.json
├── public
└── react-table.css
├── src
├── constants.js
├── table-head.js
├── table-header.js
├── table-row.js
└── table.js
└── test
└── unit
├── support
├── data.js
├── globals.js
├── helpers.js
└── setup-and-teardown.js
├── table-head-test.js
├── table-header-test.js
├── table-row-test.js
└── table-test.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | npm-debug.log
3 | *.built.*
4 |
--------------------------------------------------------------------------------
/.mversionrc:
--------------------------------------------------------------------------------
1 | {
2 | "commitMessage": "%s",
3 | "tagName": "v%s",
4 | "scripts": {
5 | "preupdate": "echo 'Bumping version and running tests'",
6 | "precommit": "npm test",
7 | "postcommit": "git push && git push --tags && npm publish",
8 | "postupdate": "echo 'Updated to version %s in manifest files'"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.nvmrc:
--------------------------------------------------------------------------------
1 | v0.10.36
2 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | sudo: false
3 | node_js:
4 | - "0.10"
5 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Please include tests with your changes to help make reviewing and merging easy.
2 |
3 | #### How to test out local changes in another repo with `react-table` as a dependency
4 |
5 | Here's one approach to test out local changes, e.g. for a new branch called `#4-configurable-sort-column`
6 |
7 | 1. fork this repo on GitHub
8 | 2. clone your fork to your local machine
9 | 3. from your fork: `git checkout origin/#4-configurable-sort-column`
10 | 4. from this detached HEAD, checkout into a new local branch: `git checkout -b \#4-configurable-sort-column`
11 | 5. run [`npm link`](https://docs.npmjs.com/cli/link)
12 | 6. inside your project that uses `react-table` run `npm link react-table` to use your local copy
13 |
14 | Or you can also point your package.json to a git url e.g.
15 |
16 | ```json
17 | dependencies: {
18 | "react-table": "nicktomlin/react-table#4-configurable-sort-column"
19 | }
20 | ```
21 |
22 | Although this won't allow you to run against local changes.
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | React Table
2 | ---
3 |
4 | [](https://travis-ci.org/NickTomlin/react-table)
5 | 
6 |
7 | A simple sortable table component for react.
8 |
9 | # Usage
10 |
11 | `npm i @nicktomlin/react-table` (not an npm user? see instructions below)
12 |
13 | ```javasript
14 | var React = require('react');
15 | var ReactTable = require('react-table');
16 | var data = [
17 | {favoriteColor:'blue', age: 30, name: "Athos", job: "Musketeer"},
18 | {favoriteColor: 'red' , age: 33, name: "Porthos", job: "Musketeer"},
19 | {favoriteColor: 'blue' , age: 27, name: "Aramis", job: "Musketeer"},
20 | {favoriteColor: 'orange' , age: 25, name: "d'Artagnan", job: "Guard"}
21 | ];
22 |
23 | React.render(, document.body);
24 | ```
25 |
26 | See examples for a more full featured use case.
27 |
28 | ## Usage without NPM
29 |
30 | Include the built files in `dist` with a `
14 |