Fix tail spinner disapearing before new content being loaded

Reviewed By: larrylin28

Differential Revision: D14990884

fbshipit-source-id: 601ef618c6dda7e58abee57241de3c0edd528915
This commit is contained in:
Spencer Ahrens
2019-04-23 16:00:44 -07:00
committed by Facebook Github Bot
parent 88787b5e7a
commit e4392b773c

View File

@@ -1426,7 +1426,11 @@ class VirtualizedList extends React.PureComponent<Props, State> {
// starving the renderer from actually laying out the objects and computing _averageCellLength.
// If this is triggered in an `componentDidUpdate` followed by a hiPri cellToRenderUpdate
// We shouldn't do another hipri cellToRenderUpdate
if (hiPri && this._averageCellLength && !this._hiPriInProgress) {
if (
hiPri &&
(this._averageCellLength || this.props.getItemLayout) &&
!this._hiPriInProgress
) {
this._hiPriInProgress = true;
// Don't worry about interactions when scrolling quickly; focus on filling content as fast
// as possible.