Skip to content

Commit 3c49ce4

Browse files
authored
use flatlist getNode() to support reanimated v1 (#1313)
1 parent 5aadf72 commit 3c49ce4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/incubator/WheelPicker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const WheelPicker = React.memo(({
130130
onChange?.(items?.[index]?.value, index);
131131
}
132132
//@ts-ignore for some reason scrollToOffset isn't recognized
133-
setTimeout(() => scrollView.current?.scrollToOffset({offset: index * itemHeight, animated}), 100);
133+
setTimeout(() => scrollView.current?.getNode()?.scrollToOffset({offset: index * itemHeight, animated}), 100);
134134
};
135135

136136
const selectItem = useCallback(index => {

0 commit comments

Comments
 (0)