Skip to content

Commit

Permalink
fix: remove drawer methods from navigation prop
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jan 4, 2020
1 parent 4278291 commit 683892e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 7 additions & 1 deletion example/src/Drawer.tsx
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions typescript/react-navigation.d.ts
Expand Up @@ -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]>
Expand Down

0 comments on commit 683892e

Please sign in to comment.