Skip to content

Commit

Permalink
fix artificial expanding on appear new items
Browse files Browse the repository at this point in the history
  • Loading branch information
LucioChavezFuentes committed Nov 18, 2022
1 parent 4d7ddd4 commit def6211
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,10 @@ export default class VirtualizedList extends StateSafePureComponent<
this.props,
);
const lastMetrics = this.__getFrameMetricsApprox(last, this.props);
const spacerSize =
lastMetrics.offset + lastMetrics.length - firstMetrics.offset;
const spacerSize = Math.max(
lastMetrics.offset + lastMetrics.length - firstMetrics.offset,
0,
);
cells.push(
<View
key={`$spacer-${section.first}`}
Expand Down

0 comments on commit def6211

Please sign in to comment.