{"action":"created","issue":{"url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/196","repository_url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker","labels_url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/196/comments","events_url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/196/events","html_url":"https://github.com/mmazzarolo/react-native-modal-datetime-picker/issues/196","id":362568797,"node_id":"MDU6SXNzdWUzNjI1Njg3OTc=","number":196,"title":"External usage of function \"onCancel\"","user":{"login":"vasyl91","id":42324650,"node_id":"MDQ6VXNlcjQyMzI0NjUw","avatar_url":"https://avatars0.githubusercontent.com/u/42324650?v=4","gravatar_id":"","url":"https://api.github.com/users/vasyl91","html_url":"https://github.com/vasyl91","followers_url":"https://api.github.com/users/vasyl91/followers","following_url":"https://api.github.com/users/vasyl91/following{/other_user}","gists_url":"https://api.github.com/users/vasyl91/gists{/gist_id}","starred_url":"https://api.github.com/users/vasyl91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasyl91/subscriptions","organizations_url":"https://api.github.com/users/vasyl91/orgs","repos_url":"https://api.github.com/users/vasyl91/repos","events_url":"https://api.github.com/users/vasyl91/events{/privacy}","received_events_url":"https://api.github.com/users/vasyl91/received_events","type":"User","site_admin":false},"labels":[{"id":442457754,"node_id":"MDU6TGFiZWw0NDI0NTc3NTQ=","url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/labels/invalid","name":"invalid","color":"e6e6e6","default":true},{"id":442457757,"node_id":"MDU6TGFiZWw0NDI0NTc3NTc=","url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-09-21T11:14:07Z","updated_at":"2018-09-21T15:29:02Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\nMy app activity depends on connection status. I tried to hide DateTimePicker when it is disconnected but it doesn't seem to work (when I put the code to `render`, picker is still visible, app ends up with infinite loop and crashes after while):\r\n\r\n```\r\nif (this.props.connectionStatus === config.connectionStatus.DISCONNECTED) {\r\n   this._hideDateTimePicker;\r\n}\r\n```\r\n\r\n So my other idea is to programmatically use `onCancel` function so it could be triggered when app state changes.  Something like:\r\n\r\n```\r\nif (this.props.connectionStatus === config.connectionStatus.DISCONNECTED) {\r\n   this.\"functionThatUsesOnClose\"();\r\n}\r\n```\r\n\r\nIs there any way to do that? Thank you in advance for reply!"},"comment":{"url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/comments/423573998","html_url":"https://github.com/mmazzarolo/react-native-modal-datetime-picker/issues/196#issuecomment-423573998","issue_url":"https://api.github.com/repos/mmazzarolo/react-native-modal-datetime-picker/issues/196","id":423573998,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzU3Mzk5OA==","user":{"login":"mmazzarolo","id":9536354,"node_id":"MDQ6VXNlcjk1MzYzNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/9536354?v=4","gravatar_id":"","url":"https://api.github.com/users/mmazzarolo","html_url":"https://github.com/mmazzarolo","followers_url":"https://api.github.com/users/mmazzarolo/followers","following_url":"https://api.github.com/users/mmazzarolo/following{/other_user}","gists_url":"https://api.github.com/users/mmazzarolo/gists{/gist_id}","starred_url":"https://api.github.com/users/mmazzarolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmazzarolo/subscriptions","organizations_url":"https://api.github.com/users/mmazzarolo/orgs","repos_url":"https://api.github.com/users/mmazzarolo/repos","events_url":"https://api.github.com/users/mmazzarolo/events{/privacy}","received_events_url":"https://api.github.com/users/mmazzarolo/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T15:29:02Z","updated_at":"2018-09-21T15:29:02Z","author_association":"OWNER","body":"I'm sorry but this is not a feature request, it's just an issue with your code/project (were you able to run the example available in the readme?).  \r\n\r\nJust sign-up into [stackoverflow](https://stackoverflow.com/) and ask a new question about the issue you're having.  \r\nI would also suggest to add there a bit more context (e.g. the entire file)."}}
{"actor":{"display_login":"mmazzarolo"}}