Replies: 2 comments
-
@tibbe could you try to wrap scrollTo in runOnUI? const MyComponent = () => {
const scrollViewRef = useAnimatedRef<Reanimated.ScrollView>();
const doScroll = React.useCallback(() => {
"worklet";
runOnUI(scrollTo)(
scrollViewRef,
0,
y - SCROLL_ANIMATION_TOP_PADDING,
true,
);
}, [...]);
// CustomReportForm wraps the KeyboardAwareScrollView:
return (
// Calls doScroll somewhere here
<CustomReportForm ref={scrollViewRef} />
);
}; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using a RN |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm replacing
react-native-keyboard-aware-scroll-view
withreact-native-keyboard-controller
and I'm trying to mimic the behavior of thescrollToPosition
method onKeyboardAwareScrollView
in the former package. So far I've tried:(Relevant snippets:)
Unfortunately nothing happens. I've added logging to confirm that
scrollTo
is called with sensible values (that worked with the other package).Beta Was this translation helpful? Give feedback.
All reactions