Skip to content

Commit 6b063d3

Browse files
authored
Merge pull request #20 from henrybuilt/v2
v2 tested and complete
2 parents 82b9185 + 04160d5 commit 6b063d3

File tree

11 files changed

+3688
-5054
lines changed

11 files changed

+3688
-5054
lines changed

README.md

+12-13
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,20 @@ Responsive and dynamically-sized fixed headers and columns for tables inspired b
66

77
## Features
88

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

17-
Doesn't yet support: Multiple columns/headers, client side sorting, or IE <= 7.
19+
#### Doesn't yet support
20+
21+
- Client side sorting
22+
- IE <= 7
1823

1924
## Getting Started
2025

@@ -24,7 +29,7 @@ Install `react-sticky-table` using `npm`.
2429
npm install react-sticky-table --save
2530
```
2631

27-
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.
32+
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.
2833

2934
## Example
3035
```javascript
@@ -57,14 +62,8 @@ export default class BasicExample extends Component {
5762

5863
## Options
5964

60-
Default settings:
61-
62-
```javascript
63-
{
64-
stickyHeaderCount: 1,
65-
stickyColumnCount: 1
66-
}
67-
```
65+
- `stickyHeaderCount`: default: `1`, value: `any integer >= 0`
66+
- `stickyColumnCount`: default: `1`, value: `any integer >= 0`
6867

6968
Disable sticky header:
7069

@@ -83,7 +82,7 @@ Disable sticky column:
8382
Scroll event:
8483

8584
```javascript
86-
<StickyTable onScroll={function(object) {}}>
85+
<StickyTable onScroll={event => {}}>
8786
```
8887

8988
Scroll event object:

dist/Table/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
value: function render() {
104104
return _react2.default.createElement(
105105
'div',
106-
_extends({}, this.props, { className: 'sticky-table-container ' + (this.props.className || '') }),
106+
_extends({}, this.props, { className: 'sticky-table-table ' + (this.props.className || '') }),
107107
this.props.children
108108
);
109109
}

0 commit comments

Comments
 (0)