I'm using a Native-Base Drawer
component, and I'm setting the openDrawerOffset
value myself to be 300 wide (see code below). My main problem is tapToClose
is acting as if the drawer is the default width and only responding to a tap within the last 15% of the screen or so.
Is this a bug in native-base? And is there a workaround?
My code is below:
<Drawer
tapToClose={true}
openDrawerOffset={1 - (300 / Dimensions.get('window').width)} // this has to be 300 wide
initializeOpen={true}
ref={(ref) => { this.drawer = ref; }} // not really using this anymore
content={
<SideBarView navigator={this.navigator} closeDrawer={this.closeDrawer.bind(this)} />
}
onClose={() => this.closeDrawer()} >
<MainViewTitlebar
title={this.props.title}
openDrawer={this.openDrawer.bind(this)}
navigation={this.props.navigation}>
</MainViewTitlebar>
<View style={styles.content}>
{this.renderMainView()}
</View>
</Drawer>