Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to 6.7.4 from original #1

Merged
merged 31 commits into from
Nov 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ff95c21
make rt-tfoot flex behaviour the same as rt-thead (#459)
deoxxa Aug 31, 2017
e8c557d
Make the css for input and select more specific (#446)
s7dhansh Aug 31, 2017
fcb8269
Fixed documentation: was referencing expandedRows props for ReactTabl…
bellp Aug 31, 2017
3043cbe
readme-updated: Fixed incorrect property names for expanded (was expa…
colwynmyself Aug 31, 2017
646b701
Update package.json
tannerlinsley Aug 31, 2017
8d4deb3
Update README.md
tannerlinsley Sep 1, 2017
5c53109
Update Code Sponsor link position (#480)
Sep 8, 2017
8cec156
Re-position code sponsor (#504)
Sep 21, 2017
dadfcc1
6.6.0
tannerlinsley Sep 29, 2017
e91bb91
Expose page/pageSize to rows/cells (#581)
dmarkow Oct 27, 2017
56b721c
fixes issue #564 - IE not displaying rows (#569)
mikedevita Oct 27, 2017
9efee14
Update README.md (#551)
eu42 Oct 27, 2017
e42b7bb
Add the PropTypes node module (#550)
frankolson Oct 27, 2017
fa425a1
Linter cleanup (#548)
frankolson Oct 27, 2017
225a747
Update index.styl (#537)
s7dhansh Oct 27, 2017
189ee43
Supply sort direction to custom sort methods (#476) (#533)
simon-bond Oct 27, 2017
55ef8a9
Fix missing comma in Component Overrides docs (#525)
jontansey Oct 27, 2017
2b9c546
Added a comma into an array (#524)
Oct 27, 2017
05f4aae
Update README.md to include npm as option for installing. (#523)
shadowfool Oct 27, 2017
b285288
Merge branch 'master' of https://github.com/react-tools/react-table
tannerlinsley Oct 27, 2017
879a6ac
Deps, linting, and style upgrades
tannerlinsley Oct 27, 2017
93ceffb
6.7.0-alpha-0
tannerlinsley Oct 27, 2017
cd0222f
6.7.0
tannerlinsley Oct 27, 2017
bb2f969
Fix: eslint-config moved to dev deps
tannerlinsley Oct 27, 2017
35e8636
6.7.1
tannerlinsley Oct 27, 2017
e59ddc1
Fix getPropTypes proptype check
tannerlinsley Oct 27, 2017
5759885
6.7.2
tannerlinsley Oct 27, 2017
d798584
Fix the rest of the proptypes
tannerlinsley Oct 27, 2017
2dcfef8
6.7.3
tannerlinsley Oct 27, 2017
e94e888
Fix Prop types for columns
tannerlinsley Oct 27, 2017
adc07de
6.7.4
tannerlinsley Oct 27, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 1 addition & 75 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,77 +1,3 @@
module.exports = {
parserOptions: {
ecmaVersion: 8,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true,
node: false,
classes: true
},
sourceType: 'module'
},

parser: 'babel-eslint',

extends: ['standard'],

plugins: ['react'],

rules: {
// Nozzle
'jsx-quotes': [2, 'prefer-single'],
'comma-dangle': [2, 'always-multiline'],

// // React
'react/jsx-boolean-value': 2,
'react/jsx-curly-spacing': [2, 'never'],
'react/jsx-equals-spacing': [2, 'never'],
// 'react/jsx-indent': 2,
'react/jsx-indent-props': [2, 2],
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-undef': 2,
'react/jsx-tag-spacing': [
2,
{
closingSlash: 'never',
beforeSelfClosing: 'always',
afterOpening: 'never'
}
],
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/self-closing-comp': 2,
'react/jsx-no-bind': [
2,
{
allowArrowFunctions: true,
allowBind: false,
ignoreRefs: true
}
],
'react/no-did-update-set-state': 2,
'react/no-unknown-property': 2,
'react/react-in-jsx-scope': 2,
'react/jsx-closing-bracket-location': [0, 'tag-aligned'],
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
'react/jsx-wrap-multilines': 2,
'react/self-closing-comp': 2,
'react/jsx-key': 2,
'react/jsx-no-comment-textnodes': 2,
'react/jsx-no-duplicate-props': 2,
'react/jsx-no-target-blank': 2,
'react/jsx-no-undef': 2,
'react/jsx-uses-react': 2,
'react/jsx-uses-vars': 2,
'react/no-danger-with-children': 2,
'react/no-deprecated': 2,
'react/no-direct-mutation-state': 2,
'react/no-find-dom-node': 2,
'react/no-is-mounted': 2,
'react/no-render-return-value': 2,
'react/no-string-refs': 2,
'react/no-unknown-property': 2,
'react/react-in-jsx-scope': 2,
'react/require-render-return': 2
// 'react/jsx-max-props-per-line': [2, { maximum: 1 }]
}
extends: 'react-tools'
}
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# React Table
`react-table` is a **lightweight, fast and extendable datagrid** built for React


<a href="https://travis-ci.org/react-tools/react-table" target="\_parent">
<img alt="" src="https://travis-ci.org/react-tools/react-table.svg?branch=master" />
</a>
Expand Down Expand Up @@ -75,7 +74,11 @@
## Installation
1. Install React Table as a dependency
```bash
# Yarn
$ yarn add react-table

# NPM
$ npm install react-table
```
2. Import the `react-table` module
```javascript
Expand Down Expand Up @@ -179,7 +182,7 @@ These are all of the available props (and their default values) for the main `<R
const id = filter.pivotId || filter.id
return row[id] !== undefined ? String(row[id]).startsWith(filter.value) : true
},
defaultSortMethod: (a, b) => {
defaultSortMethod: (a, b, desc) => {
// force null and undefined to the bottom
a = (a === null || a === undefined) ? -Infinity : a
b = (b === null || b === undefined) ? -Infinity : b
Expand Down Expand Up @@ -309,7 +312,7 @@ These are all of the available props (and their default values) for the main `<R
previousText: 'Previous',
nextText: 'Next',
loadingText: 'Loading...',
noDataText: 'No rows found',
noDataText: 'No rows found',
pageText: 'Page',
ofText: 'of',
rowsText: 'rows',
Expand Down Expand Up @@ -487,7 +490,7 @@ const columns = [{
}, {
Header: 'Food',
accessor: 'favorites.food'
} {
}, {
Header: 'Actor',
accessor: 'favorites.actor'
}]
Expand Down Expand Up @@ -577,6 +580,8 @@ Every single built-in component's props can be dynamically extended using any on
/>
```

If used, **a callback prop must return an valid object**, even if it's an empty one.

These callbacks are executed with each render of the element with four parameters:
1. Table State
2. RowInfo (undefined if not applicable)
Expand Down Expand Up @@ -754,7 +759,7 @@ Here are the props and their corresponding callbacks that control the state of t
id: 'firstName',
desc: true
}]}
expandedRows={{ // The nested row indexes on the current page that should appear expanded
expanded={{ // The nested row indexes on the current page that should appear expanded
1: true,
4: true,
5: {
Expand All @@ -766,7 +771,7 @@ Here are the props and their corresponding callbacks that control the state of t
id: 'lastName',
value: 'linsley'
}]}
resizing={[{ // the current resized column model
resized={[{ // the current resized column model
"id": "lastName",
"value": 446.25
}]}
Expand All @@ -775,7 +780,7 @@ Here are the props and their corresponding callbacks that control the state of t
onPageChange={(pageIndex) => {...}} // Called when the page index is changed by the user
onPageSizeChange={(pageSize, pageIndex) => {...}} // Called when the pageSize is changed by the user. The resolve page is also sent to maintain approximate position in the data
onSortedChange={(newSorted, column, shiftKey) => {...}} // Called when a sortable column header is clicked with the column itself and if the shiftkey was held. If the column is a pivoted column, `column` will be an array of columns
onExpandedChange={(newExpanded, index, event) => {...}} // Called when an expander is clicked. Use this to manage `expandedRows`
onExpandedChange={(newExpanded, index, event) => {...}} // Called when an expander is clicked. Use this to manage `expanded`
onFilteredChange={(column, value) => {...}} // Called when a user enters a value into a filter input field or the value passed to the onFiltersChange handler by the Filter option.
onResizedChange={(newResized, event) => {...}} // Called when a user clicks on a resizing component (the right edge of a column header)
/>
Expand Down Expand Up @@ -836,9 +841,9 @@ To override the sorting algorithm for a single column, use the `sortMethod` colu
Supply a function that implements the native javascript [`Array.sort`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) interface. This is React Table's default sorting algorithm:
- `a` the first value to compare
- `b` the second value to compare
- `dir` the
- `desc` true if sort is descending, false if ascending
```javascript
defaultSortMethod = (a, b) => {
defaultSortMethod = (a, b, desc) => {
// force null and undefined to the bottom
a = (a === null || a === undefined) ? -Infinity : a
b = (b === null || b === undefined) ? -Infinity : b
Expand Down Expand Up @@ -870,7 +875,7 @@ By default, `filterMethod` is passed a single row of data at a time, and you are

Alternatively, you can set `filterAll` to `true`, and `filterMethod` will be passed the entire array of rows to be filtered, and you will then be responsible for returning the new filtered array. This is extremely handy when you need to utilize a utility like fuzzy matching that requires the entire array of items.

To completely override the filter that is shown, you can set the `Filter` column option. Using this option you can specify the JSX that is shown. The option is passed an `onChange` method which must be called with the the value that you wan't to pass to the `filterMethod` option whenever the filter has changed.
To completely override the filter that is shown, you can set the `Filter` column option. Using this option you can specify the JSX that is shown. The option is passed an `onChange` method which must be called with the the value that you want to pass to the `filterMethod` option whenever the filter has changed.

See <a href="http://react-table.js.org/#/story/custom-filtering" target="\_parent">Custom Filtering</a> demo for examples.

Expand All @@ -885,7 +890,7 @@ Object.assign(ReactTableDefaults, {
TbodyComponent: component,
TrGroupComponent: component,
TrComponent: component,
ThComponent: component
ThComponent: component,
TdComponent: component,
TfootComponent: component,
ExpanderComponent: component,
Expand Down
8 changes: 4 additions & 4 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
"version": "0.1.0",
"private": true,
"devDependencies": {
"react-scripts": "0.9.5",
"standard": "^10.0.2",
"autoprefixer": "^6.7.0",
"babel-cli": "6.14.0",
"babel-eslint": "6.1.2",
Expand All @@ -21,17 +19,19 @@
"react-json-tree": "^0.10.9",
"rimraf": "^2.6.1",
"standard": "^10.0.2",
"stylus": "^0.54.5",
"webpack": "^2.5.1"
"stylus": "^0.54.5"
},
"dependencies": {
"eslint-config-react-tools": "^1.0.10",
"github-markdown-css": "^2.6.0",
"marked": "^0.3.6",
"namor": "^1.0.1",
"raw-loader": "^0.5.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-json-tree": "^0.10.9",
"react-script": "^2.0.5",
"react-scripts": "^0.9.5",
"react-story": "^0.0.10"
},
"scripts": {
Expand Down
5 changes: 3 additions & 2 deletions docs/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class App extends React.Component {
height: '100%',
}}
pathPrefix='story/'
StoryWrapper={props =>
StoryWrapper={props => (
<defaultProps.StoryWrapper
css={{
padding: 0,
Expand Down Expand Up @@ -95,7 +95,8 @@ export default class App extends React.Component {
position: 'relative',
}}
/>
</defaultProps.StoryWrapper>}
</defaultProps.StoryWrapper>
)}
stories={stories}
/>
)
Expand Down
Loading