Skip to content

Commit

Permalink
Fix VirtualizedList onViewableItemsChanged not triggered if first ite…
Browse files Browse the repository at this point in the history
…m in data evaluate to false facebook#35280
  • Loading branch information
samchan0221 committed Nov 9, 2022
1 parent 5744b21 commit bc2dbbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -1749,7 +1749,8 @@ export default class VirtualizedList extends StateSafePureComponent<
'Tried to get frame for out of range index ' + index,
);
const item = getItem(data, index);
const frame = item && this._frames[this._keyExtractor(item, index, props)];
const frame =
item != null && this._frames[this._keyExtractor(item, index, props)];
if (!frame || frame.index !== index) {
if (getItemLayout) {
/* $FlowFixMe[prop-missing] (>=0.63.0 site=react_native_fb) This comment
Expand Down

0 comments on commit bc2dbbb

Please sign in to comment.