Skip to content

Commit 8e7a79b

Browse files
committed
Update WheelPicker.tsx
1 parent 71a0e2b commit 8e7a79b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/WheelPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const WheelPicker: React.FC<Props> = ({
111111
}
112112
}) => {
113113
const positionY = event?.nativeEvent?.contentOffset?.y ?? 0;
114-
const index = positionY / itemHeight
114+
const index = Math.floor(positionY / itemHeight)
115115
setScrollIndex(index)
116116
}
117117

0 commit comments

Comments
 (0)