Skip to content

Commit

Permalink
Sticky column feature
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhudson committed Jan 5, 2017
1 parent 5dd9b3b commit 011f20e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
this.columnCount = rows[0] && rows[0].props.children.length || 0;

if (rows.length) {
if (this.stickyColumnCount > 0) {
if (this.stickyColumnCount > 0 && this.stickyHeaderCount > 0) {
stickyCorner = this.getStickyCorner(rows);
}
if (this.stickyColumnCount > 0) {
Expand Down
1 change: 1 addition & 0 deletions dist/react-sticky-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
top: 0;
z-index: 3;
border-right: 2px solid #e5e5e5;
border-bottom: 2px solid #e5e5e5;
}
.sticky-table .sticky-header {
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class StickyTable extends Component {
this.columnCount = (rows[0] && rows[0].props.children.length) || 0;

if (rows.length) {
if (this.stickyColumnCount > 0) {
if (this.stickyColumnCount > 0 && this.stickyHeaderCount > 0) {
stickyCorner = this.getStickyCorner(rows);
}
if (this.stickyColumnCount > 0) {
Expand Down
1 change: 1 addition & 0 deletions src/sticky-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
top: 0;
z-index: 3;
border-right: 2px solid #e5e5e5;
border-bottom: 2px solid #e5e5e5;
}
.sticky-table .sticky-header {
position: absolute;
Expand Down

0 comments on commit 011f20e

Please sign in to comment.