mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add codegen to AndroidDrawer
Summary: Using Ricky's last changes I managed to subscribe for both new and old event name. Fixed event to proper one for codegen in native code. Reviewed By: TheSavior Differential Revision: D16065660 fbshipit-source-id: b5d3762d673a34bbdf5a8e60ff4d51617c8adb81
This commit is contained in:
committed by
Facebook Github Bot
parent
aa860fb5df
commit
b7782fb57c
@@ -22,7 +22,7 @@ const nullthrows = require('nullthrows');
|
||||
const DrawerConsts = UIManager.getViewManagerConfig('AndroidDrawerLayout')
|
||||
.Constants;
|
||||
const dismissKeyboard = require('../../Utilities/dismissKeyboard');
|
||||
const AndroidDrawerLayoutNativeComponent = require('./AndroidDrawerLayoutNativeComponent');
|
||||
import AndroidDrawerLayoutNativeComponent from './AndroidDrawerLayoutNativeComponent';
|
||||
|
||||
const DRAWER_STATES = ['Idle', 'Dragging', 'Settling'];
|
||||
|
||||
@@ -176,7 +176,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
|
||||
state = {statusBarBackgroundColor: null};
|
||||
|
||||
render() {
|
||||
const {onDrawerStateChanged, ...props} = this.props;
|
||||
const {onDrawerStateChanged, renderNavigationView, ...props} = this.props;
|
||||
const drawStatusBar =
|
||||
Platform.Version >= 21 && this.props.statusBarBackgroundColor;
|
||||
const drawerViewWrapper = (
|
||||
@@ -189,7 +189,7 @@ class DrawerLayoutAndroid extends React.Component<Props, State> {
|
||||
},
|
||||
]}
|
||||
collapsable={false}>
|
||||
{this.props.renderNavigationView()}
|
||||
{renderNavigationView()}
|
||||
{drawStatusBar && <View style={styles.drawerStatusBar} />}
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user