More "types"
This commit is contained in:
@@ -14,6 +14,7 @@ import Animated, {
|
|||||||
runOnJS,
|
runOnJS,
|
||||||
scrollTo,
|
scrollTo,
|
||||||
useAnimatedRef,
|
useAnimatedRef,
|
||||||
|
SharedValue,
|
||||||
} from 'react-native-reanimated'
|
} from 'react-native-reanimated'
|
||||||
import {Pager, PagerRef, RenderTabBarFnProps} from 'view/com/pager/Pager'
|
import {Pager, PagerRef, RenderTabBarFnProps} from 'view/com/pager/Pager'
|
||||||
import {TabBar} from './TabBar'
|
import {TabBar} from './TabBar'
|
||||||
@@ -187,15 +188,19 @@ export const PagerWithHeader = React.forwardRef<PagerRef, PagerWithHeaderProps>(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
function PagerItem(
|
function PagerItem({
|
||||||
{
|
headerHeight,
|
||||||
headerHeight,
|
isScrolledDown,
|
||||||
isScrolledDown,
|
onScroll,
|
||||||
onScroll,
|
renderTab,
|
||||||
renderTab,
|
forcedScrollY,
|
||||||
forcedScrollY,
|
}: {
|
||||||
}: any /* TODO */,
|
headerHeight: number
|
||||||
) {
|
isScrolledDown: boolean
|
||||||
|
forcedScrollY: SharedValue<number> | null
|
||||||
|
onScroll: OnScrollCb
|
||||||
|
renderTab: ((props: PagerWithHeaderChildParams) => JSX.Element) | null
|
||||||
|
}) {
|
||||||
const scrollElRef = useAnimatedRef()
|
const scrollElRef = useAnimatedRef()
|
||||||
useAnimatedReaction(
|
useAnimatedReaction(
|
||||||
() => {
|
() => {
|
||||||
@@ -230,7 +235,9 @@ function PagerItem(
|
|||||||
headerHeight,
|
headerHeight,
|
||||||
isScrolledDown,
|
isScrolledDown,
|
||||||
onScroll,
|
onScroll,
|
||||||
scrollElRef,
|
scrollElRef: scrollElRef as React.MutableRefObject<
|
||||||
|
FlatList<any> | ScrollView | null
|
||||||
|
>,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user