Skip to content

Commit

Permalink
If <Table /> is hidden, don't recalculate rowHeight.
Browse files Browse the repository at this point in the history
  • Loading branch information
ystarlongzi committed Feb 15, 2017
1 parent 78fbd1a commit 6a98774
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,12 @@ const Table = React.createClass({
},

syncFixedTableRowHeight() {
const tableRect = this.tableNode.getBoundingClientRect();
// If tableNode's height less than 0, suppose it is hidden and don't recalculate rowHeight.
// see: https://github.com/ant-design/ant-design/issues/4836
if (tableRect.height <= 0) {
return;
}
const { prefixCls } = this.props;
const headRows = this.refs.headTable ?
this.refs.headTable.querySelectorAll('thead') :
Expand Down

0 comments on commit 6a98774

Please sign in to comment.