{"action":"closed","issue":{"url":"https://api.github.com/repos/root-two/react-native-drawer/issues/119","repository_url":"https://api.github.com/repos/root-two/react-native-drawer","labels_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/119/comments","events_url":"https://api.github.com/repos/root-two/react-native-drawer/issues/119/events","html_url":"https://github.com/root-two/react-native-drawer/issues/119","id":140820518,"number":119,"title":"Unexpected behaviour onOpen onClose in v2.0.0","user":{"login":"DavoCg","id":5452654,"avatar_url":"https://avatars.githubusercontent.com/u/5452654?v=3","gravatar_id":"","url":"https://api.github.com/users/DavoCg","html_url":"https://github.com/DavoCg","followers_url":"https://api.github.com/users/DavoCg/followers","following_url":"https://api.github.com/users/DavoCg/following{/other_user}","gists_url":"https://api.github.com/users/DavoCg/gists{/gist_id}","starred_url":"https://api.github.com/users/DavoCg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavoCg/subscriptions","organizations_url":"https://api.github.com/users/DavoCg/orgs","repos_url":"https://api.github.com/users/DavoCg/repos","events_url":"https://api.github.com/users/DavoCg/events{/privacy}","received_events_url":"https://api.github.com/users/DavoCg/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-14T23:00:40Z","updated_at":"2016-03-18T02:13:37Z","closed_at":"2016-03-18T02:13:37Z","body":"Hi,\r\n\r\nI've just switched from 1.16.x to v2.0.0 alpha and I have an unexpected behaviour with onOpen and onClose props.\r\n\r\nthis is my drawer component :\r\n\r\n````\r\n         <Drawer\r\n                ref={\"drawer\"}\r\n                type=\"static\"\r\n                content={<Menu items={items} {...this.props} navigate={this.navigate}/>}\r\n                openDrawerOffset={0.35}\r\n                styles={{main: {shadowColor: \"#000000\", shadowOpacity: 0.3, shadowRadius: 15}}}\r\n                onOpen={() => this.setState({drawerOpen: true})}\r\n                onClose={() => this.setState({drawerOpen: false})}\r\n                captureGestures={false}\r\n                tweenDuration={100}\r\n                negotiatePan={true}\r\n                panThreshold={0.08}\r\n                panOpenMask={0.35}\r\n                disabled={this.state.drawerDisabled}\r\n                tweenHandler={Drawer.tweenPresets.parallax}>\r\n```\r\n\r\nI need to set state with drawerOpen [true or false] when drawer open or close to open or close it programatically with this method : \r\n\r\n```\r\ntoggle(){\r\n        const fn = this.state.drawerOpen ? 'close' : 'open';\r\n        this.refs.drawer[fn]();\r\n    }\r\n```\r\nOn previous version everything works well but now : \r\n When I open the drawer (programatically or with swipe gesture) the component re render and the drawer close automatically.\r\n\r\nMaybe i missed something but i've tried all props and i can't make it works.\r\n\r\nThanks for this amazing module v2 is a really smooth \r\n\r\nDavoCg\r\n \r\n "}}