Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
fix(Table): use refs correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
TattdCodeMonkey committed Feb 28, 2019
1 parent 6267cb2 commit 812d80b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class Table extends React.Component {
this.cachedIDs = [];
this.container = window;

this.containerRef = React.createRef();
this.headersRef = React.createRef();
this.itemHeightContainer = React.createRef();
}

Expand Down Expand Up @@ -316,8 +318,8 @@ class Table extends React.Component {
const itemHeight = state.itemHeight || props.itemHeight || 0;

return (
<div ref="container">
<table ref="headers" className={classes}>
<div ref={this.containerRef}>
<table ref={this.headersRef} className={classes}>
{props.colGroup}
<thead>
<tr>{this.getHeaders(columns, sortBy)}</tr>
Expand Down

0 comments on commit 812d80b

Please sign in to comment.