Skip to content

Commit

Permalink
fix: account for ListHeaderComponent length when calculating offset…
Browse files Browse the repository at this point in the history
… in VirtualizedList - fixes facebook#16612
  • Loading branch information
shakyShane committed Jan 2, 2018
1 parent a8391bd commit 4d7fbd0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
}

_selectOffset(metrics: {x: number, y: number}): number {
return !this.props.horizontal ? metrics.y : metrics.x;
return (
(!this.props.horizontal ? metrics.y : metrics.x) - this._headerLength
);
}

_maybeCallOnEndReached() {
Expand Down

0 comments on commit 4d7fbd0

Please sign in to comment.