Skip to content

Commit 96a5f0e

Browse files
committed
use flatlist getNode() to support reanimated v1 (wix#1313)
1 parent a363303 commit 96a5f0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/incubator/WheelPicker/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ const WheelPicker = React.memo(({
123123

124124
const scrollToIndex = (index: number, animated: boolean) => {
125125
//@ts-ignore for some reason scrollToOffset isn't recognized
126-
scrollView.current?.scrollToOffset({offset: index * itemHeight, animated});
126+
setTimeout(() => scrollView.current?.getNode()?.scrollToOffset({offset: index * itemHeight, animated}), 100);
127127
};
128128

129129
const selectItem = useCallback(index => {

0 commit comments

Comments
 (0)