Skip to content

Commit 08141ef

Browse files
sahrensgrabbou
authored andcommitted
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
1 parent c286769 commit 08141ef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,6 +1122,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
11221122
}
11231123

11241124
this._computeBlankness();
1125+
this._updateViewableItems(this.props.data);
11251126
}
11261127

11271128
_onCellUnmount = (cellKey: string) => {

0 commit comments

Comments
 (0)