@momo-kits/foundation 0.102.5 → 0.102.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Layout/Screen.tsx +3 -4
- package/package.json +1 -1
package/Layout/Screen.tsx
CHANGED
|
@@ -132,13 +132,12 @@ const Screen = forwardRef(
|
|
|
132
132
|
inputSearchProps,
|
|
133
133
|
inputSearchRef,
|
|
134
134
|
}: ScreenProps,
|
|
135
|
-
ref
|
|
135
|
+
ref: any
|
|
136
136
|
) => {
|
|
137
137
|
const {theme} = useContext(ApplicationContext);
|
|
138
138
|
const insets = useSafeAreaInsets();
|
|
139
139
|
const heightHeader = useHeaderHeight();
|
|
140
140
|
const animatedValue = useRef<Animated.Value>(new Animated.Value(0));
|
|
141
|
-
const scrollViewRef = useRef<any>(ref);
|
|
142
141
|
const currentTint = useRef(Colors.black_01);
|
|
143
142
|
const isTab = navigation?.instance?.getState?.()?.type === 'tab';
|
|
144
143
|
|
|
@@ -345,7 +344,7 @@ const Screen = forwardRef(
|
|
|
345
344
|
useNativeDriver: true,
|
|
346
345
|
duration: 300,
|
|
347
346
|
}).start();
|
|
348
|
-
|
|
347
|
+
ref?.scrollTo({y: 0, animated: true});
|
|
349
348
|
}
|
|
350
349
|
scrollViewProps?.onScrollEndDrag?.(e);
|
|
351
350
|
};
|
|
@@ -433,7 +432,7 @@ const Screen = forwardRef(
|
|
|
433
432
|
|
|
434
433
|
<Component
|
|
435
434
|
{...scrollViewProps}
|
|
436
|
-
ref={
|
|
435
|
+
ref={ref}
|
|
437
436
|
showsVerticalScrollIndicator={false}
|
|
438
437
|
onScroll={handleScroll}
|
|
439
438
|
onScrollEndDrag={handleScrollEnd}
|