make sure onLayout calls _updateViewableItems immediately

Summary:
Makes sure `onViewableItemsChanged` fires ASAP when `waitForInterations` is false.

This also works around another deeper bug where updates scheduled with `InteractionManager` aren't firing at all in some cases, and thus instead of just firing late, `onViewableItemsChanged` isn't firing until scroll which is not what we want with `waitForInterations: false`. That bug will require more digging.

Differential Revision: D14984333

fbshipit-source-id: 718b39670307c6bc16268759bdb513682745265d
This commit is contained in:
Spencer Ahrens 2019-04-17 14:18:34 -07:00 committed by Mike Grabowski
parent c286769d28
commit 08141ef155

View File

@ -1122,6 +1122,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}
this._computeBlankness();
this._updateViewableItems(this.props.data);
}
_onCellUnmount = (cellKey: string) => {