Skip to content

Commit

Permalink
Use targetTop instead of ciurrentTop for the next scroll position
Browse files Browse the repository at this point in the history
  • Loading branch information
pomber committed Mar 16, 2019
1 parent c7e7b85 commit f209961
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Scroller({
if (!prevState.snap || recalculate) {
//todo memo
const oldIndex = getAreaIndex(
prevState.currentTop,
prevState.targetTop,
snapAreas,
heights,
height
Expand Down

0 comments on commit f209961

Please sign in to comment.