Skip to content

Commit

Permalink
Merge pull request #20 from henrybuilt/v2
Browse files Browse the repository at this point in the history
v2 tested and complete
  • Loading branch information
maxhudson authored Feb 23, 2018
2 parents 82b9185 + 04160d5 commit 6b063d3
Show file tree
Hide file tree
Showing 11 changed files with 3,688 additions and 5,054 deletions.
25 changes: 12 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ Responsive and dynamically-sized fixed headers and columns for tables inspired b

## Features

- Optional fixed column & header
- Any number of fixed columns & headers
- Responsive table dimensions (wrap it in any size container and it will fill that container)
- Dynamic row height & column width (no need to specify width and height in pixels)
- Rows and columns resize as content resizes
- Table rows/columns resize as content resizes
- Custom cells (just make sure your custom cell has `display: table-cell` set)
- Multiple tables per page
- Scrollbars that are smooth and visible at all times
- Native vertical scrolling
- 0 dependencies

Doesn't yet support: Multiple columns/headers, client side sorting, or IE <= 7.
#### Doesn't yet support

- Client side sorting
- IE <= 7

## Getting Started

Expand All @@ -24,7 +29,7 @@ Install `react-sticky-table` using `npm`.
npm install react-sticky-table --save
```

Make sure you import the mandatory stylesheet: [react-sticky-table/dist/react-sticky-table.css](https://github.com/henrybuilt/react-sticky-table/blob/master/dist/react-sticky-table.css). Feel free to overwrite it, though. It should be unobtrusive.
Make sure you import the mandatory stylesheet: [react-sticky-table/dist/react-sticky-table.css](https://github.com/henrybuilt/react-sticky-table/blob/master/dist/react-sticky-table.css). It should be unobtrusive.

## Example
```javascript
Expand Down Expand Up @@ -57,14 +62,8 @@ export default class BasicExample extends Component {

## Options

Default settings:

```javascript
{
stickyHeaderCount: 1,
stickyColumnCount: 1
}
```
- `stickyHeaderCount`: default: `1`, value: `any integer >= 0`
- `stickyColumnCount`: default: `1`, value: `any integer >= 0`

Disable sticky header:

Expand All @@ -83,7 +82,7 @@ Disable sticky column:
Scroll event:

```javascript
<StickyTable onScroll={function(object) {}}>
<StickyTable onScroll={event => {}}>
```

Scroll event object:
Expand Down
2 changes: 1 addition & 1 deletion dist/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
value: function render() {
return _react2.default.createElement(
'div',
_extends({}, this.props, { className: 'sticky-table-container ' + (this.props.className || '') }),
_extends({}, this.props, { className: 'sticky-table-table ' + (this.props.className || '') }),
this.props.children
);
}
Expand Down
Loading

0 comments on commit 6b063d3

Please sign in to comment.