Skip to content

Commit 93e9235

Browse files
committed
Update WheelPicker.tsx
1 parent 8e7a79b commit 93e9235

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 = Math.floor(positionY / itemHeight)
114+
const index = Math.round(positionY / itemHeight)
115115
setScrollIndex(index)
116116
}
117117

0 commit comments

Comments
 (0)