We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf917ab commit 74fe8efCopy full SHA for 74fe8ef
src/Provider.tsx
@@ -1,5 +1,6 @@
1
import React, {
2
useCallback,
3
+ useEffect,
4
useLayoutEffect,
5
useMemo,
6
useState,
@@ -18,6 +19,7 @@ import Animated, {
18
19
type SharedValue,
20
} from 'react-native-reanimated';
21
import {
22
+ Keyboard,
23
TextInput,
24
type ScrollViewProps,
25
type TextInputProps,
@@ -181,6 +183,16 @@ export function useFormSmartScroll({
181
183
182
184
const translateY = useSharedValue(0);
185
186
+ useEffect(() => {
187
+ const sub = Keyboard.addListener('keyboardWillHide', () => {
188
+ translateY.value = withTiming(0);
189
+ });
190
+
191
+ return () => {
192
+ sub.remove();
193
+ };
194
+ }, []);
195
196
useAnimatedReaction(
197
() => currentFocus,
198
(focus) => {
0 commit comments