File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 22
33## NEXT VERSION
44
5+ - fix: ` getTotalRowsHeight ` could be different before/after render in dynamic mode on initial render
6+
57## v1.10.6 (2020-07-25)
68
79- fix: ` getTotalRowsHeight ` could be different before/after render in dynamic mode
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ class BaseTable extends React.PureComponent {
125125 this . _rowHeightMapBuffer = { } ;
126126 this . _resetIndex = null ;
127127 this . forceUpdateTable ( ) ;
128+ this . forceUpdate ( ) ;
128129 this . _isResetting = false ;
129130 } , 0 ) ;
130131
@@ -742,14 +743,9 @@ class BaseTable extends React.PureComponent {
742743 this . _maybeScrollbarPresenceChange ( ) ;
743744
744745 if ( estimatedRowHeight ) {
745- // we have to wrap with setTimeout or we would still get the previous value,
746- // as we reset the inner components directly instead of update the table itself after row heights measured,
747- // so `componentDidUpdate` won't be invoked after that
748- setTimeout ( ( ) => {
749- if ( this . getTotalRowsHeight ( ) !== this . _totalRowsHeight ) {
750- this . forceUpdate ( ) ;
751- }
752- } ) ;
746+ if ( this . getTotalRowsHeight ( ) !== this . _totalRowsHeight ) {
747+ this . forceUpdate ( ) ;
748+ }
753749 }
754750 }
755751
You can’t perform that action at this time.
0 commit comments