root-two/react-native-drawer

Cannot close drawer from drawer content

Opened this issue · 0 comments

I am using React native 0.50. How can i Close navigator from content?

Importing drawer content from another component
import Drawercontent from "./app/components/drawer";

Here is my content
content={<Drawercontent/>}

inside drawer content

export default class Drawercontent extends Component {
return (
      <View style={[styles.containerNoraml,styles.drawrContainer]}>
        <ListView
        dataSource={this.state.dataSource}
        renderRow={(rowData) =>
            <TouchableHighlight onPress={()=>{closeDrawer()}} underlayColor="#d9e2f3">
                <View style={styles.slideMenuList}>
                    <View style={styles.slideMenuIconContainer}>
                        <Image style={styles.slideMenuIcon} source={rowData.icon}/>
                    </View>
                    <Text style={styles.slideMenuText}>{rowData.text}</Text>
                </View>
            </TouchableHighlight>}/>
      </View>
      )
}

I want close my drawer using closeDrawer() function