Skip to content

Commit

Permalink
Merge pull request #76 from yesmeck/reduce-render
Browse files Browse the repository at this point in the history
call syncFixedTableRowHeight only if any columns fixed
  • Loading branch information
afc163 authored Aug 24, 2016
2 parents 5c11b42 + 0a4a30b commit 90d4d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ const Table = React.createClass({

componentDidMount() {
this.resetScrollY();
this.syncFixedTableRowHeight();
const isAnyColumnsFixed = this.isAnyColumnsFixed();
if (isAnyColumnsFixed) {
this.syncFixedTableRowHeight();
this.resizeEvent = addEventListener(
window, 'resize', debounce(this.syncFixedTableRowHeight, 150)
);
Expand Down

0 comments on commit 90d4d0f

Please sign in to comment.