Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## NEXT VERSION

- fix: `getTotalRowsHeight` could be different before/after render in dynamic mode on initial render

## v1.10.6 (2020-07-25)

- fix: `getTotalRowsHeight` could be different before/after render in dynamic mode
Expand Down
12 changes: 4 additions & 8 deletions src/BaseTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class BaseTable extends React.PureComponent {
this._rowHeightMapBuffer = {};
this._resetIndex = null;
this.forceUpdateTable();
this.forceUpdate();
this._isResetting = false;
}, 0);

Expand Down Expand Up @@ -742,14 +743,9 @@ class BaseTable extends React.PureComponent {
this._maybeScrollbarPresenceChange();

if (estimatedRowHeight) {
// we have to wrap with setTimeout or we would still get the previous value,
// as we reset the inner components directly instead of update the table itself after row heights measured,
// so `componentDidUpdate` won't be invoked after that
setTimeout(() => {
if (this.getTotalRowsHeight() !== this._totalRowsHeight) {
this.forceUpdate();
}
});
if (this.getTotalRowsHeight() !== this._totalRowsHeight) {
this.forceUpdate();
}
}
}

Expand Down