@@ -18,7 +18,6 @@ import {
1818 StatusBar ,
1919 I18nManager ,
2020} from 'react-native' ;
21- import { AnimatedEvent } from 'react-native/Libraries/Animated/src/AnimatedEvent' ;
2221
2322import { PanGestureHandler , TapGestureHandler , State } from './GestureHandler' ;
2423
@@ -88,7 +87,7 @@ export default class DrawerLayout extends Component<PropType, StateType> {
8887 Right : 'right' ,
8988 } ;
9089 _openValue : ?Animated . Interpolation ;
91- _onGestureEvent : ?AnimatedEvent ;
90+ _onGestureEvent : ?Animated . Event ;
9291 _accessibilityIsModalView = React . createRef ( ) ;
9392 _pointerEventsView = React . createRef ( ) ;
9493 _panGestureHandler = React . createRef ( ) ;
@@ -353,10 +352,16 @@ export default class DrawerLayout extends Component<PropType, StateType> {
353352 this . props . drawerWidth ,
354353 options . velocity ? options . velocity : 0
355354 ) ;
355+
356+ // We need to force the update, otherwise the overlay is not rerendered and it would not be clickable
357+ this . forceUpdate ( ) ;
356358 } ;
357359
358360 closeDrawer = ( options : DrawerMovementOptionType = { } ) = > {
359361 this . _animateDrawer ( undefined , 0 , options . velocity ? options . velocity : 0 ) ;
362+
363+ // We need to force the update, otherwise the overlay is not rerendered and it would be still clickable
364+ this . forceUpdate ( ) ;
360365 } ;
361366
362367 _renderOverlay = ( ) = > {
@@ -371,6 +376,7 @@ export default class DrawerLayout extends Component<PropType, StateType> {
371376 opacity : overlayOpacity ,
372377 backgroundColor : this . props . overlayColor ,
373378 } ;
379+
374380 return (
375381 < TapGestureHandler onHandlerStateChange = { this . _onTapHandlerStateChange } >
376382 < Animated . View
@@ -455,7 +461,7 @@ export default class DrawerLayout extends Component<PropType, StateType> {
455461 ref = { this . _accessibilityIsModalView }
456462 accessibilityViewIsModal = { this . _drawerShown }
457463 style = { [ styles . drawerContainer , drawerStyles , drawerContainerStyle ] } >
458- < View style = { [ styles . drawer , dynamicDrawerStyles ] } >
464+ < View style = { dynamicDrawerStyles } >
459465 { this . props . renderNavigationView ( this . _openValue ) }
460466 </ View >
461467 </ Animated . View >
@@ -509,7 +515,6 @@ export default class DrawerLayout extends Component<PropType, StateType> {
509515}
510516
511517const styles = StyleSheet . create ( {
512- drawer : { flex : 0 } ,
513518 drawerContainer : {
514519 ...StyleSheet . absoluteFillObject ,
515520 zIndex : 1001 ,
0 commit comments