mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-09 09:13:32 +08:00
fix: remove drawer methods from navigation prop
This commit is contained in:
@@ -28,7 +28,13 @@ const MyNavScreen = ({
|
||||
<ScrollView>
|
||||
<SafeAreaView forceInset={{ top: 'always' }}>
|
||||
<SampleText>{banner}</SampleText>
|
||||
<Button onPress={() => navigation.openDrawer()} title="Open drawer" />
|
||||
<Button
|
||||
onPress={() => {
|
||||
// @ts-ignore
|
||||
navigation.openDrawer();
|
||||
}}
|
||||
title="Open drawer"
|
||||
/>
|
||||
<Button
|
||||
onPress={() => navigation.navigate('Email')}
|
||||
title="Open other screen"
|
||||
|
||||
@@ -582,9 +582,6 @@ declare module 'react-navigation' {
|
||||
params?: NavigationParams,
|
||||
action?: NavigationAction
|
||||
): boolean;
|
||||
openDrawer: () => any;
|
||||
closeDrawer: () => any;
|
||||
toggleDrawer: () => any;
|
||||
getParam<T extends keyof P>(
|
||||
param: T,
|
||||
fallback: NonNullable<P[T]>
|
||||
|
||||
Reference in New Issue
Block a user